home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / A / Alpha.5.05.cpt / Help / Tcl < prev    next >
MacBinary  |  1992-08-29  |  152.1 KB  |  [TEXT/ALFA]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: Tcl

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sat Aug 29 12:43:08 1992, modified Sat Aug 29 12:43:08 1992, creator Alpha editor, type ASCII, 154143 bytes "Tcl" , at 0x25a9f 1380 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
0% TrID Sybase iAnywhere database files default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ALFA]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 03 54 63 6c 00 00 00 | 00 00 00 00 00 00 00 00 |..Tcl...|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 41 4c 46 | 41 01 00 00 00 00 00 00 |.TEXTALF|A.......|
|00000050| 00 00 00 00 02 5a 1f 00 | 00 05 64 a6 c5 59 9c a6 |.....Z..|..d..Y..|
|00000060| c5 59 9c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.Y......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 16 db 00 00 |........|........|
|00000080| 0d 0d 0d 54 63 6c 28 33 | 29 20 20 20 20 20 20 20 |...Tcl(3|) |
|00000090| 20 20 20 20 20 20 20 20 | 20 20 43 20 4c 49 42 52 | | C LIBR|
|000000a0| 41 52 59 20 46 55 4e 43 | 54 49 4f 4e 53 20 20 20 |ARY FUNC|TIONS |
|000000b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 54 63 | | Tc|
|000000c0| 6c 28 33 29 0d 0d 0d 0d | 5f 5f 5f 5f 5f 5f 5f 5f |l(3)....|________|
|000000d0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000e0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|000000f0| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000100| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 0d 0d 4e 41 4d 45 0d |________|_..NAME.|
|00000110| 20 20 20 20 20 54 63 6c | 20 2d 20 6f 76 65 72 76 | Tcl| - overv|
|00000120| 69 65 77 20 6f 66 20 74 | 6f 6f 6c 20 63 6f 6d 6d |iew of t|ool comm|
|00000130| 61 6e 64 20 6c 61 6e 67 | 75 61 67 65 20 66 61 63 |and lang|uage fac|
|00000140| 69 6c 69 74 69 65 73 0d | 5f 5f 5f 5f 5f 5f 5f 5f |ilities.|________|
|00000150| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000160| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000170| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 5f |________|________|
|00000180| 5f 5f 5f 5f 5f 5f 5f 5f | 5f 0d 0d 0d 49 4e 54 52 |________|_...INTR|
|00000190| 4f 44 55 43 54 49 4f 4e | 0d 20 20 20 20 20 54 63 |ODUCTION|. Tc|
|000001a0| 6c 20 73 74 61 6e 64 73 | 20 66 6f 72 20 60 60 74 |l stands| for ``t|
|000001b0| 6f 6f 6c 20 63 6f 6d 6d | 61 6e 64 20 6c 61 6e 67 |ool comm|and lang|
|000001c0| 75 61 67 65 27 27 20 61 | 6e 64 20 20 69 73 20 20 |uage'' a|nd is |
|000001d0| 70 72 6f 6e 6f 75 6e 63 | 65 64 0d 20 20 20 20 20 |pronounc|ed. |
|000001e0| 60 60 74 69 63 6b 6c 65 | 2e 27 27 20 20 49 74 20 |``tickle|.'' It |
|000001f0| 20 69 73 20 20 61 63 74 | 75 61 6c 6c 79 20 20 74 | is act|ually t|
|00000200| 77 6f 20 20 74 68 69 6e | 67 73 3a 20 61 20 6c 61 |wo thin|gs: a la|
|00000210| 6e 67 75 61 67 65 20 61 | 6e 64 20 61 0d 20 20 20 |nguage a|nd a. |
|00000220| 20 20 6c 69 62 72 61 72 | 79 2e 20 20 46 69 72 73 | librar|y. Firs|
|00000230| 74 2c 20 54 63 6c 20 69 | 73 20 61 20 73 69 6d 70 |t, Tcl i|s a simp|
|00000240| 6c 65 20 74 65 78 74 75 | 61 6c 20 6c 61 6e 67 75 |le textu|al langu|
|00000250| 61 67 65 2c 20 20 69 6e | 74 65 6e 64 65 64 0d 20 |age, in|tended. |
|00000260| 20 20 20 20 70 72 69 6d | 61 72 69 6c 79 20 20 66 | prim|arily f|
|00000270| 6f 72 20 69 73 73 75 69 | 6e 67 20 63 6f 6d 6d 61 |or issui|ng comma|
|00000280| 6e 64 73 20 74 6f 20 69 | 6e 74 65 72 61 63 74 69 |nds to i|nteracti|
|00000290| 76 65 20 70 72 6f 67 72 | 61 6d 73 20 73 75 63 68 |ve progr|ams such|
|000002a0| 0d 20 20 20 20 20 61 73 | 20 74 65 78 74 20 65 64 |. as| text ed|
|000002b0| 69 74 6f 72 73 2c 20 64 | 65 62 75 67 67 65 72 73 |itors, d|ebuggers|
|000002c0| 2c 20 69 6c 6c 75 73 74 | 72 61 74 6f 72 73 2c 20 |, illust|rators, |
|000002d0| 20 61 6e 64 20 20 73 68 | 65 6c 6c 73 2e 20 20 20 | and sh|ells. |
|000002e0| 49 74 0d 20 20 20 20 20 | 68 61 73 20 20 61 20 20 |It. |has a |
|000002f0| 73 69 6d 70 6c 65 20 73 | 79 6e 74 61 78 20 61 6e |simple s|yntax an|
|00000300| 64 20 69 73 20 61 6c 73 | 6f 20 70 72 6f 67 72 61 |d is als|o progra|
|00000310| 6d 6d 61 62 6c 65 2c 20 | 73 6f 20 54 63 6c 20 75 |mmable, |so Tcl u|
|00000320| 73 65 72 73 0d 20 20 20 | 20 20 63 61 6e 20 77 72 |sers. | can wr|
|00000330| 69 74 65 20 63 6f 6d 6d | 61 6e 64 20 70 72 6f 63 |ite comm|and proc|
|00000340| 65 64 75 72 65 73 20 74 | 6f 20 70 72 6f 76 69 64 |edures t|o provid|
|00000350| 65 20 6d 6f 72 65 20 20 | 70 6f 77 65 72 66 75 6c |e more |powerful|
|00000360| 20 20 63 6f 6d 2d 0d 20 | 20 20 20 20 6d 61 6e 64 | com-. | mand|
|00000370| 73 20 74 68 61 6e 20 74 | 68 6f 73 65 20 69 6e 20 |s than t|hose in |
|00000380| 74 68 65 20 62 75 69 6c | 74 2d 69 6e 20 73 65 74 |the buil|t-in set|
|00000390| 2e 0d 0d 20 20 20 20 20 | 53 65 63 6f 6e 64 2c 20 |... |Second, |
|000003a0| 54 63 6c 20 69 73 20 61 | 20 6c 69 62 72 61 72 79 |Tcl is a| library|
|000003b0| 20 70 61 63 6b 61 67 65 | 20 74 68 61 74 20 20 63 | package| that c|
|000003c0| 61 6e 20 20 62 65 20 20 | 65 6d 62 65 64 64 65 64 |an be |embedded|
|000003d0| 20 20 69 6e 0d 20 20 20 | 20 20 61 70 70 6c 69 63 | in. | applic|
|000003e0| 61 74 69 6f 6e 20 20 70 | 72 6f 67 72 61 6d 73 2e |ation p|rograms.|
|000003f0| 20 20 54 68 65 20 54 63 | 6c 20 6c 69 62 72 61 72 | The Tc|l librar|
|00000400| 79 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 61 20 |y consis|ts of a |
|00000410| 70 61 72 73 65 72 0d 20 | 20 20 20 20 66 6f 72 20 |parser. | for |
|00000420| 74 68 65 20 54 63 6c 20 | 6c 61 6e 67 75 61 67 65 |the Tcl |language|
|00000430| 2c 20 72 6f 75 74 69 6e | 65 73 20 74 6f 20 69 6d |, routin|es to im|
|00000440| 70 6c 65 6d 65 6e 74 20 | 74 68 65 20 54 63 6c 20 |plement |the Tcl |
|00000450| 62 75 69 6c 74 2d 69 6e | 0d 20 20 20 20 20 63 6f |built-in|. co|
|00000460| 6d 6d 61 6e 64 73 2c 20 | 20 61 6e 64 20 20 70 72 |mmands, | and pr|
|00000470| 6f 63 65 64 75 72 65 73 | 20 20 74 68 61 74 20 20 |ocedures| that |
|00000480| 61 6c 6c 6f 77 20 20 65 | 61 63 68 20 61 70 70 6c |allow e|ach appl|
|00000490| 69 63 61 74 69 6f 6e 20 | 74 6f 0d 20 20 20 20 20 |ication |to. |
|000004a0| 65 78 74 65 6e 64 20 54 | 63 6c 20 77 69 74 68 20 |extend T|cl with |
|000004b0| 61 64 64 69 74 69 6f 6e | 61 6c 20 63 6f 6d 6d 61 |addition|al comma|
|000004c0| 6e 64 73 20 73 70 65 63 | 69 66 69 63 20 74 6f 20 |nds spec|ific to |
|000004d0| 74 68 61 74 20 20 61 70 | 70 6c 69 2d 0d 20 20 20 |that ap|pli-. |
|000004e0| 20 20 63 61 74 69 6f 6e | 2e 20 20 20 54 68 65 20 | cation|. The |
|000004f0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 70 72 6f 67 |applicat|ion prog|
|00000500| 72 61 6d 20 67 65 6e 65 | 72 61 74 65 73 20 54 63 |ram gene|rates Tc|
|00000510| 6c 20 63 6f 6d 6d 61 6e | 64 73 20 61 6e 64 0d 20 |l comman|ds and. |
|00000520| 20 20 20 20 70 61 73 73 | 65 73 20 74 68 65 6d 20 | pass|es them |
|00000530| 74 6f 20 74 68 65 20 54 | 63 6c 20 70 61 72 73 65 |to the T|cl parse|
|00000540| 72 20 66 6f 72 20 65 78 | 65 63 75 74 69 6f 6e 2e |r for ex|ecution.|
|00000550| 20 20 20 43 6f 6d 6d 61 | 6e 64 73 20 20 6d 61 79 | Comma|nds may|
|00000560| 0d 20 20 20 20 20 62 65 | 20 20 67 65 6e 65 72 61 |. be| genera|
|00000570| 74 65 64 20 62 79 20 72 | 65 61 64 69 6e 67 20 63 |ted by r|eading c|
|00000580| 68 61 72 61 63 74 65 72 | 73 20 66 72 6f 6d 20 61 |haracter|s from a|
|00000590| 6e 20 69 6e 70 75 74 20 | 73 6f 75 72 63 65 2c 20 |n input |source, |
|000005a0| 6f 72 0d 20 20 20 20 20 | 62 79 20 20 61 73 73 6f |or. |by asso|
|000005b0| 63 69 61 74 69 6e 67 20 | 20 63 6f 6d 6d 61 6e 64 |ciating | command|
|000005c0| 20 20 73 74 72 69 6e 67 | 73 20 20 77 69 74 68 20 | string|s with |
|000005d0| 20 65 6c 65 6d 65 6e 74 | 73 20 20 20 6f 66 20 20 | element|s of |
|000005e0| 20 74 68 65 0d 20 20 20 | 20 20 61 70 70 6c 69 63 | the. | applic|
|000005f0| 61 74 69 6f 6e 27 73 20 | 75 73 65 72 20 69 6e 74 |ation's |user int|
|00000600| 65 72 66 61 63 65 2c 20 | 73 75 63 68 20 61 73 20 |erface, |such as |
|00000610| 6d 65 6e 75 20 65 6e 74 | 72 69 65 73 2c 20 62 75 |menu ent|ries, bu|
|00000620| 74 74 6f 6e 73 2c 0d 20 | 20 20 20 20 6f 72 20 6b |ttons,. | or k|
|00000630| 65 79 73 74 72 6f 6b 65 | 73 2e 20 20 57 68 65 6e |eystroke|s. When|
|00000640| 20 74 68 65 20 54 63 6c | 20 6c 69 62 72 61 72 79 | the Tcl| library|
|00000650| 20 20 72 65 63 65 69 76 | 65 73 20 20 63 6f 6d 6d | receiv|es comm|
|00000660| 61 6e 64 73 20 20 69 74 | 0d 20 20 20 20 20 70 61 |ands it|. pa|
|00000670| 72 73 65 73 20 74 68 65 | 6d 20 69 6e 74 6f 20 63 |rses the|m into c|
|00000680| 6f 6d 70 6f 6e 65 6e 74 | 20 66 69 65 6c 64 73 20 |omponent| fields |
|00000690| 61 6e 64 20 65 78 65 63 | 75 74 65 73 20 62 75 69 |and exec|utes bui|
|000006a0| 6c 74 2d 69 6e 20 63 6f | 6d 2d 0d 20 20 20 20 20 |lt-in co|m-. |
|000006b0| 6d 61 6e 64 73 20 64 69 | 72 65 63 74 6c 79 2e 20 |mands di|rectly. |
|000006c0| 20 46 6f 72 20 63 6f 6d | 6d 61 6e 64 73 20 69 6d | For com|mands im|
|000006d0| 70 6c 65 6d 65 6e 74 65 | 64 20 20 62 79 20 20 74 |plemente|d by t|
|000006e0| 68 65 20 20 61 70 70 6c | 69 63 61 2d 0d 20 20 20 |he appl|ica-. |
|000006f0| 20 20 74 69 6f 6e 2c 20 | 20 54 63 6c 20 63 61 6c | tion, | Tcl cal|
|00000700| 6c 73 20 62 61 63 6b 20 | 74 6f 20 74 68 65 20 61 |ls back |to the a|
|00000710| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 20 65 78 |pplicati|on to ex|
|00000720| 65 63 75 74 65 20 74 68 | 65 20 63 6f 6d 2d 0d 20 |ecute th|e com-. |
|00000730| 20 20 20 20 6d 61 6e 64 | 73 2e 20 20 49 6e 20 6d | mand|s. In m|
|00000740| 61 6e 79 20 63 61 73 65 | 73 20 63 6f 6d 6d 61 6e |any case|s comman|
|00000750| 64 73 20 77 69 6c 6c 20 | 69 6e 76 6f 6b 65 20 72 |ds will |invoke r|
|00000760| 65 63 75 72 73 69 76 65 | 20 69 6e 76 6f 63 61 2d |ecursive| invoca-|
|00000770| 0d 20 20 20 20 20 74 69 | 6f 6e 73 20 20 6f 66 20 |. ti|ons of |
|00000780| 20 74 68 65 20 20 54 63 | 6c 20 20 69 6e 74 65 72 | the Tc|l inter|
|00000790| 70 72 65 74 65 72 20 20 | 62 79 20 20 70 61 73 73 |preter |by pass|
|000007a0| 69 6e 67 20 20 69 6e 20 | 61 64 64 69 74 69 6f 6e |ing in |addition|
|000007b0| 61 6c 0d 20 20 20 20 20 | 73 74 72 69 6e 67 73 20 |al. |strings |
|000007c0| 74 6f 20 65 78 65 63 75 | 74 65 20 28 70 72 6f 63 |to execu|te (proc|
|000007d0| 65 64 75 72 65 73 2c 20 | 6c 6f 6f 70 69 6e 67 20 |edures, |looping |
|000007e0| 63 6f 6d 6d 61 6e 64 73 | 2c 20 61 6e 64 20 63 6f |commands|, and co|
|000007f0| 6e 64 69 2d 0d 20 20 20 | 20 20 74 69 6f 6e 61 6c |ndi-. | tional|
|00000800| 20 63 6f 6d 6d 61 6e 64 | 73 20 61 6c 6c 20 77 6f | command|s all wo|
|00000810| 72 6b 20 69 6e 20 74 68 | 69 73 20 77 61 79 29 2e |rk in th|is way).|
|00000820| 0d 0d 20 20 20 20 20 41 | 6e 20 61 70 70 6c 69 63 |.. A|n applic|
|00000830| 61 74 69 6f 6e 20 70 72 | 6f 67 72 61 6d 20 67 61 |ation pr|ogram ga|
|00000840| 69 6e 73 20 74 68 72 65 | 65 20 61 64 76 61 6e 74 |ins thre|e advant|
|00000850| 61 67 65 73 20 62 79 20 | 20 75 73 69 6e 67 20 20 |ages by | using |
|00000860| 54 63 6c 0d 20 20 20 20 | 20 66 6f 72 20 20 69 74 |Tcl. | for it|
|00000870| 73 20 20 63 6f 6d 6d 61 | 6e 64 20 20 6c 61 6e 67 |s comma|nd lang|
|00000880| 75 61 67 65 2e 20 20 46 | 69 72 73 74 2c 20 54 63 |uage. F|irst, Tc|
|00000890| 6c 20 70 72 6f 76 69 64 | 65 73 20 61 20 73 74 61 |l provid|es a sta|
|000008a0| 6e 64 61 72 64 0d 20 20 | 20 20 20 73 79 6e 74 61 |ndard. | synta|
|000008b0| 78 3a 20 20 6f 6e 63 65 | 20 75 73 65 72 73 20 6b |x: once| users k|
|000008c0| 6e 6f 77 20 54 63 6c 2c | 20 74 68 65 79 20 77 69 |now Tcl,| they wi|
|000008d0| 6c 6c 20 20 62 65 20 20 | 61 62 6c 65 20 20 74 6f |ll be |able to|
|000008e0| 20 20 69 73 73 75 65 0d | 20 20 20 20 20 63 6f 6d | issue.| com|
|000008f0| 6d 61 6e 64 73 20 20 65 | 61 73 69 6c 79 20 20 74 |mands e|asily t|
|00000900| 6f 20 61 6e 79 20 54 63 | 6c 2d 62 61 73 65 64 20 |o any Tc|l-based |
|00000910| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 20 20 53 65 |applicat|ion. Se|
|00000920| 63 6f 6e 64 2c 20 54 63 | 6c 0d 20 20 20 20 20 70 |cond, Tc|l. p|
|00000930| 72 6f 76 69 64 65 73 20 | 70 72 6f 67 72 61 6d 6d |rovides |programm|
|00000940| 61 62 69 6c 69 74 79 2e | 20 20 41 6c 6c 20 61 20 |ability.| All a |
|00000950| 54 63 6c 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |Tcl appl|ication |
|00000960| 6e 65 65 64 73 20 74 6f | 20 64 6f 0d 20 20 20 20 |needs to| do. |
|00000970| 20 69 73 20 20 74 6f 20 | 20 69 6d 70 6c 65 6d 65 | is to | impleme|
|00000980| 6e 74 20 20 61 20 66 65 | 77 20 61 70 70 6c 69 63 |nt a fe|w applic|
|00000990| 61 74 69 6f 6e 2d 73 70 | 65 63 69 66 69 63 20 6c |ation-sp|ecific l|
|000009a0| 6f 77 2d 6c 65 76 65 6c | 20 63 6f 6d 2d 0d 20 20 |ow-level| com-. |
|000009b0| 20 20 20 6d 61 6e 64 73 | 2e 20 20 54 63 6c 20 70 | mands|. Tcl p|
|000009c0| 72 6f 76 69 64 65 73 20 | 6d 61 6e 79 20 75 74 69 |rovides |many uti|
|000009d0| 6c 69 74 79 20 63 6f 6d | 6d 61 6e 64 73 20 20 70 |lity com|mands p|
|000009e0| 6c 75 73 20 20 61 20 20 | 67 65 6e 65 72 61 6c 0d |lus a |general.|
|000009f0| 20 20 20 20 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 | pro|gramming|
|00000a00| 20 20 69 6e 74 65 72 66 | 61 63 65 20 20 66 6f 72 | interf|ace for|
|00000a10| 20 62 75 69 6c 64 69 6e | 67 20 75 70 20 63 6f 6d | buildin|g up com|
|00000a20| 70 6c 65 78 20 63 6f 6d | 6d 61 6e 64 20 70 72 6f |plex com|mand pro|
|00000a30| 2d 0d 20 20 20 20 20 63 | 65 64 75 72 65 73 2e 20 |-. c|edures. |
|00000a40| 20 42 79 20 75 73 69 6e | 67 20 54 63 6c 2c 20 61 | By usin|g Tcl, a|
|00000a50| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 6e 65 65 64 |pplicati|ons need|
|00000a60| 20 20 6e 6f 74 20 20 72 | 65 2d 69 6d 70 6c 65 6d | not r|e-implem|
|00000a70| 65 6e 74 0d 20 20 20 20 | 20 74 68 65 73 65 20 66 |ent. | these f|
|00000a80| 65 61 74 75 72 65 73 2e | 20 20 54 68 69 72 64 2c |eatures.| Third,|
|00000a90| 20 54 63 6c 20 63 61 6e | 20 62 65 20 75 73 65 64 | Tcl can| be used|
|00000aa0| 20 61 73 20 61 20 63 6f | 6d 6d 6f 6e 20 6c 61 6e | as a co|mmon lan|
|00000ab0| 67 75 61 67 65 20 20 7c | 0d 20 20 20 20 20 66 6f |guage ||. fo|
|00000ac0| 72 20 63 6f 6d 6d 75 6e | 69 63 61 74 69 6e 67 20 |r commun|icating |
|00000ad0| 62 65 74 77 65 65 6e 20 | 20 61 70 70 6c 69 63 61 |between | applica|
|00000ae0| 74 69 6f 6e 73 2e 20 20 | 20 49 6e 74 65 72 2d 61 |tions. | Inter-a|
|00000af0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 20 7c 0d 20 20 |pplicati|on |. |
|00000b00| 20 20 20 63 6f 6d 6d 75 | 6e 69 63 61 74 69 6f 6e | commu|nication|
|00000b10| 20 69 73 20 6e 6f 74 20 | 62 75 69 6c 74 20 69 6e | is not |built in|
|00000b20| 74 6f 20 74 68 65 20 54 | 63 6c 20 63 6f 72 65 20 |to the T|cl core |
|00000b30| 64 65 73 63 72 69 62 65 | 64 20 68 65 72 65 2c 20 |describe|d here, |
|00000b40| 20 7c 0d 20 20 20 20 20 | 62 75 74 20 76 61 72 69 | |. |but vari|
|00000b50| 6f 75 73 20 61 64 64 2d | 6f 6e 20 6c 69 62 72 61 |ous add-|on libra|
|00000b60| 72 69 65 73 2c 20 73 75 | 63 68 20 61 73 20 74 68 |ries, su|ch as th|
|00000b70| 65 20 54 6b 20 74 6f 6f | 6c 6b 69 74 2c 20 20 61 |e Tk too|lkit, a|
|00000b80| 6c 6c 6f 77 20 20 7c 0d | 20 20 20 20 20 61 70 70 |llow |.| app|
|00000b90| 6c 69 63 61 74 69 6f 6e | 73 20 74 6f 20 69 73 73 |lication|s to iss|
|00000ba0| 75 65 20 63 6f 6d 6d 61 | 6e 64 73 20 74 6f 20 65 |ue comma|nds to e|
|00000bb0| 61 63 68 20 6f 74 68 65 | 72 2e 20 20 54 68 69 73 |ach othe|r. This|
|00000bc0| 20 6d 61 6b 65 73 20 69 | 74 20 20 7c 0d 20 20 20 | makes i|t |. |
|00000bd0| 20 20 70 6f 73 73 69 62 | 6c 65 20 66 6f 72 20 61 | possib|le for a|
|00000be0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 74 6f 20 20 |pplicati|ons to |
|00000bf0| 77 6f 72 6b 20 20 74 6f | 67 65 74 68 65 72 20 20 |work to|gether |
|00000c00| 69 6e 20 20 6d 75 63 68 | 20 20 6d 6f 72 65 20 20 |in much| more |
|00000c10| 7c 0d 20 20 20 20 20 70 | 6f 77 65 72 66 75 6c 20 ||. p|owerful |
|00000c20| 77 61 79 73 20 74 68 61 | 6e 20 77 61 73 20 70 72 |ways tha|n was pr|
|00000c30| 65 76 69 6f 75 73 6c 79 | 20 70 6f 73 73 69 62 6c |eviously| possibl|
|00000c40| 65 2e 0d 0d 0d 0d 53 75 | 6e 20 52 65 6c 65 61 73 |e.....Su|n Releas|
|00000c50| 65 20 34 2e 31 20 20 20 | 20 20 20 20 20 20 20 20 |e 4.1 | |
|00000c60| 4c 61 73 74 20 63 68 61 | 6e 67 65 3a 20 20 20 20 |Last cha|nge: |
|00000c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000c80| 20 20 20 20 20 20 31 0d | 0d 0d 0d 0d 0d 0d 54 63 | 1.|......Tc|
|00000c90| 6c 28 33 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |l(3) | |
|00000ca0| 20 20 20 20 20 43 20 4c | 49 42 52 41 52 59 20 46 | C L|IBRARY F|
|00000cb0| 55 4e 43 54 49 4f 4e 53 | 20 20 20 20 20 20 20 20 |UNCTIONS| |
|00000cc0| 20 20 20 20 20 20 20 20 | 20 54 63 6c 28 33 29 0d | | Tcl(3).|
|00000cd0| 0d 0d 0d 20 20 20 20 20 | 54 68 69 73 20 6d 61 6e |... |This man|
|00000ce0| 75 61 6c 20 70 61 67 65 | 20 66 6f 63 75 73 65 73 |ual page| focuses|
|00000cf0| 20 70 72 69 6d 61 72 69 | 6c 79 20 6f 6e 20 74 68 | primari|ly on th|
|00000d00| 65 20 54 63 6c 20 6c 61 | 6e 67 75 61 67 65 2e 20 |e Tcl la|nguage. |
|00000d10| 20 20 49 74 0d 20 20 20 | 20 20 64 65 73 63 72 69 | It. | descri|
|00000d20| 62 65 73 20 74 68 65 20 | 6c 61 6e 67 75 61 67 65 |bes the |language|
|00000d30| 20 73 79 6e 74 61 78 20 | 61 6e 64 20 74 68 65 20 | syntax |and the |
|00000d40| 62 75 69 6c 74 2d 69 6e | 20 63 6f 6d 6d 61 6e 64 |built-in| command|
|00000d50| 73 20 74 68 61 74 0d 20 | 20 20 20 20 77 69 6c 6c |s that. | will|
|00000d60| 20 62 65 20 61 76 61 69 | 6c 61 62 6c 65 20 69 6e | be avai|lable in|
|00000d70| 20 61 6e 79 20 20 61 70 | 70 6c 69 63 61 74 69 6f | any ap|plicatio|
|00000d80| 6e 20 20 62 61 73 65 64 | 20 20 6f 6e 20 20 54 63 |n based| on Tc|
|00000d90| 6c 2e 20 20 20 54 68 65 | 0d 20 20 20 20 20 69 6e |l. The|. in|
|00000da0| 64 69 76 69 64 75 61 6c | 20 20 6c 69 62 72 61 72 |dividual| librar|
|00000db0| 79 20 20 70 72 6f 63 65 | 64 75 72 65 73 20 61 72 |y proce|dures ar|
|00000dc0| 65 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 20 6d |e descri|bed in m|
|00000dd0| 6f 72 65 20 64 65 74 61 | 69 6c 0d 20 20 20 20 20 |ore deta|il. |
|00000de0| 69 6e 20 73 65 70 61 72 | 61 74 65 20 6d 61 6e 75 |in separ|ate manu|
|00000df0| 61 6c 20 70 61 67 65 73 | 2c 20 6f 6e 65 20 70 65 |al pages|, one pe|
|00000e00| 72 20 70 72 6f 63 65 64 | 75 72 65 2e 0d 0d 0d 49 |r proced|ure....I|
|00000e10| 4e 54 45 52 50 52 45 54 | 45 52 53 0d 20 20 20 20 |NTERPRET|ERS. |
|00000e20| 20 54 68 65 20 63 65 6e | 74 72 61 6c 20 64 61 74 | The cen|tral dat|
|00000e30| 61 20 73 74 72 75 63 74 | 75 72 65 20 69 6e 20 54 |a struct|ure in T|
|00000e40| 63 6c 20 69 73 20 61 6e | 20 69 6e 74 65 72 70 72 |cl is an| interpr|
|00000e50| 65 74 65 72 20 28 43 20 | 20 74 79 70 65 0d 20 20 |eter (C | type. |
|00000e60| 20 20 20 60 60 54 63 6c | 5f 49 6e 74 65 72 70 27 | ``Tcl|_Interp'|
|00000e70| 27 29 2e 20 20 20 41 6e | 20 20 69 6e 74 65 72 70 |'). An| interp|
|00000e80| 72 65 74 65 72 20 63 6f | 6e 73 69 73 74 73 20 6f |reter co|nsists o|
|00000e90| 66 20 61 20 73 65 74 20 | 6f 66 20 63 6f 6d 2d 0d |f a set |of com-.|
|00000ea0| 20 20 20 20 20 6d 61 6e | 64 20 62 69 6e 64 69 6e | man|d bindin|
|00000eb0| 67 73 2c 20 61 20 73 65 | 74 20 6f 66 20 76 61 72 |gs, a se|t of var|
|00000ec0| 69 61 62 6c 65 20 76 61 | 6c 75 65 73 2c 20 20 61 |iable va|lues, a|
|00000ed0| 6e 64 20 20 61 20 20 66 | 65 77 20 20 6f 74 68 65 |nd a f|ew othe|
|00000ee0| 72 0d 20 20 20 20 20 6d | 69 73 63 65 6c 6c 61 6e |r. m|iscellan|
|00000ef0| 65 6f 75 73 20 20 70 69 | 65 63 65 73 20 20 6f 66 |eous pi|eces of|
|00000f00| 20 73 74 61 74 65 2e 20 | 20 45 61 63 68 20 54 63 | state. | Each Tc|
|00000f10| 6c 20 63 6f 6d 6d 61 6e | 64 20 69 73 20 69 6e 74 |l comman|d is int|
|00000f20| 65 72 2d 0d 20 20 20 20 | 20 70 72 65 74 65 64 20 |er-. | preted |
|00000f30| 69 6e 20 74 68 65 20 63 | 6f 6e 74 65 78 74 20 6f |in the c|ontext o|
|00000f40| 66 20 20 61 20 20 70 61 | 72 74 69 63 75 6c 61 72 |f a pa|rticular|
|00000f50| 20 20 69 6e 74 65 72 70 | 72 65 74 65 72 2e 20 20 | interp|reter. |
|00000f60| 20 53 6f 6d 65 0d 20 20 | 20 20 20 54 63 6c 2d 62 | Some. | Tcl-b|
|00000f70| 61 73 65 64 20 20 61 70 | 70 6c 69 63 61 74 69 6f |ased ap|plicatio|
|00000f80| 6e 73 20 20 77 69 6c 6c | 20 6d 61 69 6e 74 61 69 |ns will| maintai|
|00000f90| 6e 20 6d 75 6c 74 69 70 | 6c 65 20 69 6e 74 65 72 |n multip|le inter|
|00000fa0| 70 72 65 74 65 72 73 0d | 20 20 20 20 20 73 69 6d |preters.| sim|
|00000fb0| 75 6c 74 61 6e 65 6f 75 | 73 6c 79 2c 20 65 61 63 |ultaneou|sly, eac|
|00000fc0| 68 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |h associ|ated wit|
|00000fd0| 68 20 61 20 64 69 66 66 | 65 72 65 6e 74 20 20 77 |h a diff|erent w|
|00000fe0| 69 64 67 65 74 20 20 6f | 72 0d 20 20 20 20 20 70 |idget o|r. p|
|00000ff0| 6f 72 74 69 6f 6e 20 20 | 6f 66 20 20 74 68 65 20 |ortion |of the |
|00001000| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2e 20 20 20 | applica|tion. |
|00001010| 49 6e 74 65 72 70 72 65 | 74 65 72 73 20 61 72 65 |Interpre|ters are|
|00001020| 20 72 65 6c 61 74 69 76 | 65 6c 79 0d 20 20 20 20 | relativ|ely. |
|00001030| 20 6c 69 67 68 74 77 65 | 69 67 68 74 20 73 74 72 | lightwe|ight str|
|00001040| 75 63 74 75 72 65 73 2e | 20 20 54 68 65 79 20 63 |uctures.| They c|
|00001050| 61 6e 20 20 62 65 20 20 | 63 72 65 61 74 65 64 20 |an be |created |
|00001060| 20 61 6e 64 20 20 64 65 | 6c 65 74 65 64 0d 20 20 | and de|leted. |
|00001070| 20 20 20 71 75 69 63 6b | 6c 79 2c 20 20 73 6f 20 | quick|ly, so |
|00001080| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 70 72 6f 67 |applicat|ion prog|
|00001090| 72 61 6d 6d 65 72 73 20 | 73 68 6f 75 6c 64 20 66 |rammers |should f|
|000010a0| 65 65 6c 20 66 72 65 65 | 20 74 6f 20 75 73 65 0d |eel free| to use.|
|000010b0| 20 20 20 20 20 6d 75 6c | 74 69 70 6c 65 20 69 6e | mul|tiple in|
|000010c0| 74 65 72 70 72 65 74 65 | 72 73 20 69 66 20 74 68 |terprete|rs if th|
|000010d0| 61 74 20 20 73 69 6d 70 | 6c 69 66 69 65 73 20 20 |at simp|lifies |
|000010e0| 74 68 65 20 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |the app|lication|
|000010f0| 2e 0d 20 20 20 20 20 45 | 76 65 6e 74 75 61 6c 6c |.. E|ventuall|
|00001100| 79 20 54 63 6c 20 77 69 | 6c 6c 20 70 72 6f 76 69 |y Tcl wi|ll provi|
|00001110| 64 65 20 61 20 6d 65 63 | 68 61 6e 69 73 6d 20 66 |de a mec|hanism f|
|00001120| 6f 72 20 73 65 6e 64 69 | 6e 67 20 54 63 6c 20 63 |or sendi|ng Tcl c|
|00001130| 6f 6d 2d 0d 20 20 20 20 | 20 6d 61 6e 64 73 20 61 |om-. | mands a|
|00001140| 6e 64 20 72 65 73 75 6c | 74 73 20 62 61 63 6b 20 |nd resul|ts back |
|00001150| 61 6e 64 20 66 6f 72 74 | 68 20 62 65 74 77 65 65 |and fort|h betwee|
|00001160| 6e 20 69 6e 74 65 72 70 | 72 65 74 65 72 73 2c 20 |n interp|reters, |
|00001170| 20 65 76 65 6e 0d 20 20 | 20 20 20 69 66 20 74 68 | even. | if th|
|00001180| 65 20 69 6e 74 65 72 70 | 72 65 74 65 72 73 20 61 |e interp|reters a|
|00001190| 72 65 20 6d 61 6e 61 67 | 65 64 20 62 79 20 64 69 |re manag|ed by di|
|000011a0| 66 66 65 72 65 6e 74 20 | 70 72 6f 63 65 73 73 65 |fferent |processe|
|000011b0| 73 2e 0d 0d 0d 44 41 54 | 41 20 54 59 50 45 53 0d |s....DAT|A TYPES.|
|000011c0| 20 20 20 20 20 54 63 6c | 20 73 75 70 70 6f 72 74 | Tcl| support|
|000011d0| 73 20 6f 6e 6c 79 20 6f | 6e 65 20 74 79 70 65 20 |s only o|ne type |
|000011e0| 6f 66 20 64 61 74 61 3a | 20 20 73 74 72 69 6e 67 |of data:| string|
|000011f0| 73 2e 20 20 41 6c 6c 20 | 63 6f 6d 6d 61 6e 64 73 |s. All |commands|
|00001200| 2c 0d 20 20 20 20 20 61 | 6c 6c 20 20 61 72 67 75 |,. a|ll argu|
|00001210| 6d 65 6e 74 73 20 20 74 | 6f 20 20 63 6f 6d 6d 61 |ments t|o comma|
|00001220| 6e 64 73 2c 20 20 61 6c | 6c 20 20 63 6f 6d 6d 61 |nds, al|l comma|
|00001230| 6e 64 20 72 65 73 75 6c | 74 73 2c 20 61 6e 64 20 |nd resul|ts, and |
|00001240| 61 6c 6c 0d 20 20 20 20 | 20 76 61 72 69 61 62 6c |all. | variabl|
|00001250| 65 20 76 61 6c 75 65 73 | 20 61 72 65 20 73 74 72 |e values| are str|
|00001260| 69 6e 67 73 2e 20 20 57 | 68 65 72 65 20 63 6f 6d |ings. W|here com|
|00001270| 6d 61 6e 64 73 20 72 65 | 71 75 69 72 65 20 6e 75 |mands re|quire nu|
|00001280| 6d 65 72 69 63 0d 20 20 | 20 20 20 61 72 67 75 6d |meric. | argum|
|00001290| 65 6e 74 73 20 20 6f 72 | 20 20 72 65 74 75 72 6e |ents or| return|
|000012a0| 20 20 6e 75 6d 65 72 69 | 63 20 20 72 65 73 75 6c | numeri|c resul|
|000012b0| 74 73 2c 20 20 74 68 65 | 20 20 61 72 67 75 6d 65 |ts, the| argume|
|000012c0| 6e 74 73 20 61 6e 64 0d | 20 20 20 20 20 72 65 73 |nts and.| res|
|000012d0| 75 6c 74 73 20 61 72 65 | 20 70 61 73 73 65 64 20 |ults are| passed |
|000012e0| 61 73 20 73 74 72 69 6e | 67 73 2e 20 20 4d 61 6e |as strin|gs. Man|
|000012f0| 79 20 63 6f 6d 6d 61 6e | 64 73 20 20 65 78 70 65 |y comman|ds expe|
|00001300| 63 74 20 20 74 68 65 69 | 72 0d 20 20 20 20 20 73 |ct thei|r. s|
|00001310| 74 72 69 6e 67 20 61 72 | 67 75 6d 65 6e 74 73 20 |tring ar|guments |
|00001320| 74 6f 20 68 61 76 65 20 | 63 65 72 74 61 69 6e 20 |to have |certain |
|00001330| 66 6f 72 6d 61 74 73 2c | 20 62 75 74 20 74 68 69 |formats,| but thi|
|00001340| 73 20 69 6e 74 65 72 70 | 72 65 2d 0d 20 20 20 20 |s interp|re-. |
|00001350| 20 74 61 74 69 6f 6e 20 | 69 73 20 75 70 20 74 6f | tation |is up to|
|00001360| 20 74 68 65 20 69 6e 64 | 69 76 69 64 75 61 6c 20 | the ind|ividual |
|00001370| 63 6f 6d 6d 61 6e 64 73 | 2e 20 20 46 6f 72 20 65 |commands|. For e|
|00001380| 78 61 6d 70 6c 65 2c 20 | 61 72 67 75 2d 0d 20 20 |xample, |argu-. |
|00001390| 20 20 20 6d 65 6e 74 73 | 20 20 6f 66 74 65 6e 20 | ments| often |
|000013a0| 63 6f 6e 74 61 69 6e 20 | 54 63 6c 20 63 6f 6d 6d |contain |Tcl comm|
|000013b0| 61 6e 64 20 73 74 72 69 | 6e 67 73 2c 20 77 68 69 |and stri|ngs, whi|
|000013c0| 63 68 20 6d 61 79 20 67 | 65 74 20 65 78 65 2d 0d |ch may g|et exe-.|
|000013d0| 20 20 20 20 20 63 75 74 | 65 64 20 61 73 20 70 61 | cut|ed as pa|
|000013e0| 72 74 20 6f 66 20 74 68 | 65 20 63 6f 6d 6d 61 6e |rt of th|e comman|
|000013f0| 64 73 2e 20 20 54 68 65 | 20 65 61 73 69 65 73 74 |ds. The| easiest|
|00001400| 20 20 77 61 79 20 20 74 | 6f 20 20 75 6e 64 65 72 | way t|o under|
|00001410| 2d 0d 20 20 20 20 20 73 | 74 61 6e 64 20 20 74 68 |-. s|tand th|
|00001420| 65 20 54 63 6c 20 69 6e | 74 65 72 70 72 65 74 65 |e Tcl in|terprete|
|00001430| 72 20 69 73 20 74 6f 20 | 72 65 6d 65 6d 62 65 72 |r is to |remember|
|00001440| 20 74 68 61 74 20 65 76 | 65 72 79 74 68 69 6e 67 | that ev|erything|
|00001450| 20 69 73 0d 20 20 20 20 | 20 6a 75 73 74 20 61 6e | is. | just an|
|00001460| 20 6f 70 65 72 61 74 69 | 6f 6e 20 6f 6e 20 61 20 | operati|on on a |
|00001470| 73 74 72 69 6e 67 2e 20 | 20 49 6e 20 6d 61 6e 79 |string. | In many|
|00001480| 20 63 61 73 65 73 20 54 | 63 6c 20 63 6f 6e 73 74 | cases T|cl const|
|00001490| 72 75 63 74 73 0d 20 20 | 20 20 20 77 69 6c 6c 20 |ructs. | will |
|000014a0| 20 6c 6f 6f 6b 20 20 73 | 69 6d 69 6c 61 72 20 74 | look s|imilar t|
|000014b0| 6f 20 6d 6f 72 65 20 73 | 74 72 75 63 74 75 72 65 |o more s|tructure|
|000014c0| 64 20 63 6f 6e 73 74 72 | 75 63 74 73 20 66 72 6f |d constr|ucts fro|
|000014d0| 6d 20 6f 74 68 65 72 0d | 20 20 20 20 20 6c 61 6e |m other.| lan|
|000014e0| 67 75 61 67 65 73 2e 20 | 20 48 6f 77 65 76 65 72 |guages. | However|
|000014f0| 2c 20 74 68 65 20 54 63 | 6c 20 63 6f 6e 73 74 72 |, the Tc|l constr|
|00001500| 75 63 74 73 20 61 72 65 | 20 20 6e 6f 74 20 20 73 |ucts are| not s|
|00001510| 74 72 75 63 74 75 72 65 | 64 0d 20 20 20 20 20 61 |tructure|d. a|
|00001520| 74 20 20 61 6c 6c 3b 20 | 74 68 65 79 20 61 72 65 |t all; |they are|
|00001530| 20 6a 75 73 74 20 73 74 | 72 69 6e 67 73 20 6f 66 | just st|rings of|
|00001540| 20 63 68 61 72 61 63 74 | 65 72 73 2c 20 61 6e 64 | charact|ers, and|
|00001550| 20 74 68 69 73 20 67 69 | 76 65 73 0d 20 20 20 20 | this gi|ves. |
|00001560| 20 74 68 65 6d 20 61 20 | 64 69 66 66 65 72 65 6e | them a |differen|
|00001570| 74 20 62 65 68 61 76 69 | 6f 72 20 74 68 61 6e 20 |t behavi|or than |
|00001580| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 73 20 74 |the stru|ctures t|
|00001590| 68 65 79 20 6d 61 79 20 | 20 6c 6f 6f 6b 0d 20 20 |hey may | look. |
|000015a0| 20 20 20 6c 69 6b 65 2e | 0d 0d 20 20 20 20 20 41 | like.|.. A|
|000015b0| 6c 74 68 6f 75 67 68 20 | 74 68 65 20 65 78 61 63 |lthough |the exac|
|000015c0| 74 20 69 6e 74 65 72 70 | 72 65 74 61 74 69 6f 6e |t interp|retation|
|000015d0| 20 6f 66 20 61 20 54 63 | 6c 20 73 74 72 69 6e 67 | of a Tc|l string|
|000015e0| 20 64 65 70 65 6e 64 73 | 20 6f 6e 0d 20 20 20 20 | depends| on. |
|000015f0| 20 77 68 6f 20 20 69 73 | 20 20 64 6f 69 6e 67 20 | who is| doing |
|00001600| 20 74 68 65 20 20 69 6e | 74 65 72 70 72 65 74 61 | the in|terpreta|
|00001610| 74 69 6f 6e 2c 20 20 74 | 68 65 72 65 20 61 72 65 |tion, t|here are|
|00001620| 20 74 68 72 65 65 20 63 | 6f 6d 6d 6f 6e 0d 20 20 | three c|ommon. |
|00001630| 20 20 20 66 6f 72 6d 73 | 20 74 68 61 74 20 73 74 | forms| that st|
|00001640| 72 69 6e 67 73 20 74 61 | 6b 65 3a 20 20 63 6f 6d |rings ta|ke: com|
|00001650| 6d 61 6e 64 73 2c 20 65 | 78 70 72 65 73 73 69 6f |mands, e|xpressio|
|00001660| 6e 73 2c 20 61 6e 64 20 | 20 6c 69 73 74 73 2e 0d |ns, and | lists..|
|00001670| 20 20 20 20 20 54 68 65 | 20 20 6d 61 6a 6f 72 20 | The| major |
|00001680| 20 73 65 63 74 69 6f 6e | 73 20 62 65 6c 6f 77 20 | section|s below |
|00001690| 64 69 73 63 75 73 73 20 | 74 68 65 73 65 20 74 68 |discuss |these th|
|000016a0| 72 65 65 20 66 6f 72 6d | 73 20 69 6e 20 6d 6f 72 |ree form|s in mor|
|000016b0| 65 0d 20 20 20 20 20 64 | 65 74 61 69 6c 2e 0d 0d |e. d|etail...|
|000016c0| 0d 42 41 53 49 43 20 43 | 4f 4d 4d 41 4e 44 20 53 |.BASIC C|OMMAND S|
|000016d0| 59 4e 54 41 58 0d 20 20 | 20 20 20 54 68 65 20 54 |YNTAX. | The T|
|000016e0| 63 6c 20 6c 61 6e 67 75 | 61 67 65 20 68 61 73 20 |cl langu|age has |
|000016f0| 73 79 6e 74 61 63 74 69 | 63 20 73 69 6d 69 6c 61 |syntacti|c simila|
|00001700| 72 69 74 69 65 73 20 74 | 6f 20 62 6f 74 68 20 74 |rities t|o both t|
|00001710| 68 65 20 55 6e 69 78 0d | 20 20 20 20 20 73 68 65 |he Unix.| she|
|00001720| 6c 6c 73 20 61 6e 64 20 | 4c 69 73 70 2e 20 20 48 |lls and |Lisp. H|
|00001730| 6f 77 65 76 65 72 2c 20 | 74 68 65 20 69 6e 74 65 |owever, |the inte|
|00001740| 72 70 72 65 74 61 74 69 | 6f 6e 20 6f 66 20 63 6f |rpretati|on of co|
|00001750| 6d 6d 61 6e 64 73 20 69 | 73 0d 0d 0d 0d 53 75 6e |mmands i|s....Sun|
|00001760| 20 52 65 6c 65 61 73 65 | 20 34 2e 31 20 20 20 20 | Release| 4.1 |
|00001770| 20 20 20 20 20 20 20 4c | 61 73 74 20 63 68 61 6e | L|ast chan|
|00001780| 67 65 3a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ge: | |
|00001790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 32 0d 0d | | 2..|
|000017a0| 0d 0d 0d 0d 0d 54 63 6c | 28 33 29 20 20 20 20 20 |.....Tcl|(3) |
|000017b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 43 20 4c 49 | | C LI|
|000017c0| 42 52 41 52 59 20 46 55 | 4e 43 54 49 4f 4e 53 20 |BRARY FU|NCTIONS |
|000017d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000017e0| 54 63 6c 28 33 29 0d 0d | 0d 0d 20 20 20 20 20 64 |Tcl(3)..|.. d|
|000017f0| 69 66 66 65 72 65 6e 74 | 20 69 6e 20 54 63 6c 20 |ifferent| in Tcl |
|00001800| 74 68 61 6e 20 69 6e 20 | 65 69 74 68 65 72 20 6f |than in |either o|
|00001810| 66 20 74 68 6f 73 65 20 | 6f 74 68 65 72 20 74 77 |f those |other tw|
|00001820| 6f 20 20 73 79 73 74 65 | 6d 73 2e 0d 20 20 20 20 |o syste|ms.. |
|00001830| 20 41 20 20 54 63 6c 20 | 20 63 6f 6d 6d 61 6e 64 | A Tcl | command|
|00001840| 20 20 73 74 72 69 6e 67 | 20 20 63 6f 6e 73 69 73 | string| consis|
|00001850| 74 73 20 20 6f 66 20 20 | 6f 6e 65 20 20 6f 72 20 |ts of |one or |
|00001860| 6d 6f 72 65 20 63 6f 6d | 6d 61 6e 64 73 0d 20 20 |more com|mands. |
|00001870| 20 20 20 73 65 70 61 72 | 61 74 65 64 20 62 79 20 | separ|ated by |
|00001880| 6e 65 77 6c 69 6e 65 20 | 63 68 61 72 61 63 74 65 |newline |characte|
|00001890| 72 73 20 6f 72 20 73 65 | 6d 69 2d 63 6f 6c 6f 6e |rs or se|mi-colon|
|000018a0| 73 2e 20 20 20 45 61 63 | 68 20 20 63 6f 6d 2d 0d |s. Eac|h com-.|
|000018b0| 20 20 20 20 20 6d 61 6e | 64 20 20 63 6f 6e 73 69 | man|d consi|
|000018c0| 73 74 73 20 20 6f 66 20 | 61 20 63 6f 6c 6c 65 63 |sts of |a collec|
|000018d0| 74 69 6f 6e 20 6f 66 20 | 66 69 65 6c 64 73 20 73 |tion of |fields s|
|000018e0| 65 70 61 72 61 74 65 64 | 20 62 79 20 77 68 69 74 |eparated| by whit|
|000018f0| 65 0d 20 20 20 20 20 73 | 70 61 63 65 20 28 73 70 |e. s|pace (sp|
|00001900| 61 63 65 73 20 6f 72 20 | 74 61 62 73 29 2e 20 20 |aces or |tabs). |
|00001910| 54 68 65 20 66 69 72 73 | 74 20 66 69 65 6c 64 20 |The firs|t field |
|00001920| 6d 75 73 74 20 62 65 20 | 74 68 65 20 6e 61 6d 65 |must be |the name|
|00001930| 20 6f 66 0d 20 20 20 20 | 20 61 20 20 63 6f 6d 6d | of. | a comm|
|00001940| 61 6e 64 2c 20 61 6e 64 | 20 74 68 65 20 61 64 64 |and, and| the add|
|00001950| 69 74 69 6f 6e 61 6c 20 | 66 69 65 6c 64 73 2c 20 |itional |fields, |
|00001960| 69 66 20 61 6e 79 2c 20 | 61 72 65 20 61 72 67 75 |if any, |are argu|
|00001970| 6d 65 6e 74 73 0d 20 20 | 20 20 20 74 68 61 74 20 |ments. | that |
|00001980| 77 69 6c 6c 20 62 65 20 | 70 61 73 73 65 64 20 74 |will be |passed t|
|00001990| 6f 20 74 68 61 74 20 63 | 6f 6d 6d 61 6e 64 2e 20 |o that c|ommand. |
|000019a0| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | For exa|mple, th|
|000019b0| 65 20 20 63 6f 6d 2d 0d | 20 20 20 20 20 6d 61 6e |e com-.| man|
|000019c0| 64 0d 0d 20 20 20 20 20 | 20 20 20 20 20 73 65 74 |d.. | set|
|000019d0| 20 61 20 32 32 0d 20 20 | 20 20 20 68 61 73 20 74 | a 22. | has t|
|000019e0| 68 72 65 65 20 66 69 65 | 6c 64 73 3a 20 20 74 68 |hree fie|lds: th|
|000019f0| 65 20 66 69 72 73 74 2c | 20 73 65 74 2c 20 69 73 |e first,| set, is|
|00001a00| 20 74 68 65 20 6e 61 6d | 65 20 6f 66 20 61 20 54 | the nam|e of a T|
|00001a10| 63 6c 20 63 6f 6d 2d 0d | 20 20 20 20 20 6d 61 6e |cl com-.| man|
|00001a20| 64 2c 20 20 61 6e 64 20 | 20 74 68 65 20 20 6c 61 |d, and | the la|
|00001a30| 73 74 20 74 77 6f 2c 20 | 61 20 61 6e 64 20 32 32 |st two, |a and 22|
|00001a40| 2c 20 77 69 6c 6c 20 62 | 65 20 70 61 73 73 65 64 |, will b|e passed|
|00001a50| 20 61 73 20 61 72 67 75 | 2d 0d 20 20 20 20 20 6d | as argu|-. m|
|00001a60| 65 6e 74 73 20 74 6f 20 | 74 68 65 20 73 65 74 20 |ents to |the set |
|00001a70| 63 6f 6d 6d 61 6e 64 2e | 20 20 54 68 65 20 63 6f |command.| The co|
|00001a80| 6d 6d 61 6e 64 20 6e 61 | 6d 65 20 6d 61 79 20 72 |mmand na|me may r|
|00001a90| 65 66 65 72 20 65 69 74 | 68 65 72 0d 20 20 20 20 |efer eit|her. |
|00001aa0| 20 74 6f 20 20 61 20 20 | 62 75 69 6c 74 2d 69 6e | to a |built-in|
|00001ab0| 20 54 63 6c 20 63 6f 6d | 6d 61 6e 64 2c 20 61 6e | Tcl com|mand, an|
|00001ac0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 2d 73 70 65 | applica|tion-spe|
|00001ad0| 63 69 66 69 63 20 63 6f | 6d 6d 61 6e 64 0d 20 20 |cific co|mmand. |
|00001ae0| 20 20 20 62 6f 75 6e 64 | 20 69 6e 20 77 69 74 68 | bound| in with|
|00001af0| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 70 72 6f | the lib|rary pro|
|00001b00| 63 65 64 75 72 65 20 54 | 63 6c 5f 43 72 65 61 74 |cedure T|cl_Creat|
|00001b10| 65 43 6f 6d 6d 61 6e 64 | 2c 20 6f 72 20 20 61 0d |eCommand|, or a.|
|00001b20| 20 20 20 20 20 63 6f 6d | 6d 61 6e 64 20 20 70 72 | com|mand pr|
|00001b30| 6f 63 65 64 75 72 65 20 | 20 64 65 66 69 6e 65 64 |ocedure | defined|
|00001b40| 20 20 77 69 74 68 20 74 | 68 65 20 70 72 6f 63 20 | with t|he proc |
|00001b50| 62 75 69 6c 74 2d 69 6e | 20 63 6f 6d 6d 61 6e 64 |built-in| command|
|00001b60| 2e 0d 20 20 20 20 20 41 | 72 67 75 6d 65 6e 74 73 |.. A|rguments|
|00001b70| 20 61 72 65 20 70 61 73 | 73 65 64 20 6c 69 74 65 | are pas|sed lite|
|00001b80| 72 61 6c 6c 79 20 61 73 | 20 74 65 78 74 20 73 74 |rally as| text st|
|00001b90| 72 69 6e 67 73 2e 20 20 | 20 49 6e 64 69 76 69 64 |rings. | Individ|
|00001ba0| 75 61 6c 0d 20 20 20 20 | 20 63 6f 6d 6d 61 6e 64 |ual. | command|
|00001bb0| 73 20 20 6d 61 79 20 20 | 69 6e 74 65 72 70 72 65 |s may |interpre|
|00001bc0| 74 20 20 74 68 6f 73 65 | 20 20 73 74 72 69 6e 67 |t those| string|
|00001bd0| 73 20 69 6e 20 61 6e 79 | 20 66 61 73 68 69 6f 6e |s in any| fashion|
|00001be0| 20 74 68 65 79 0d 20 20 | 20 20 20 77 69 73 68 2e | they. | wish.|
|00001bf0| 20 20 54 68 65 20 73 65 | 74 20 63 6f 6d 6d 61 6e | The se|t comman|
|00001c00| 64 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |d, for e|xample, |
|00001c10| 77 69 6c 6c 20 20 74 72 | 65 61 74 20 20 69 74 73 |will tr|eat its|
|00001c20| 20 20 66 69 72 73 74 0d | 20 20 20 20 20 61 72 67 | first.| arg|
|00001c30| 75 6d 65 6e 74 20 20 61 | 73 20 20 74 68 65 20 6e |ument a|s the n|
|00001c40| 61 6d 65 20 6f 66 20 61 | 20 76 61 72 69 61 62 6c |ame of a| variabl|
|00001c50| 65 20 61 6e 64 20 69 74 | 73 20 73 65 63 6f 6e 64 |e and it|s second|
|00001c60| 20 61 72 67 75 6d 65 6e | 74 0d 20 20 20 20 20 61 | argumen|t. a|
|00001c70| 73 20 61 20 73 74 72 69 | 6e 67 20 76 61 6c 75 65 |s a stri|ng value|
|00001c80| 20 74 6f 20 61 73 73 69 | 67 6e 20 74 6f 20 20 74 | to assi|gn to t|
|00001c90| 68 61 74 20 20 76 61 72 | 69 61 62 6c 65 2e 20 20 |hat var|iable. |
|00001ca0| 20 46 6f 72 20 20 6f 74 | 68 65 72 0d 20 20 20 20 | For ot|her. |
|00001cb0| 20 63 6f 6d 6d 61 6e 64 | 73 20 20 61 72 67 75 6d | command|s argum|
|00001cc0| 65 6e 74 73 20 20 6d 61 | 79 20 20 62 65 20 69 6e |ents ma|y be in|
|00001cd0| 74 65 72 70 72 65 74 65 | 64 20 61 73 20 69 6e 74 |terprete|d as int|
|00001ce0| 65 67 65 72 73 2c 20 6c | 69 73 74 73 2c 0d 20 20 |egers, l|ists,. |
|00001cf0| 20 20 20 66 69 6c 65 20 | 6e 61 6d 65 73 2c 20 6f | file |names, o|
|00001d00| 72 20 54 63 6c 20 63 6f | 6d 6d 61 6e 64 73 2e 0d |r Tcl co|mmands..|
|00001d10| 0d 20 20 20 20 20 43 6f | 6d 6d 61 6e 64 20 6e 61 |. Co|mmand na|
|00001d20| 6d 65 73 20 73 68 6f 75 | 6c 64 20 6e 6f 72 6d 61 |mes shou|ld norma|
|00001d30| 6c 6c 79 20 62 65 20 74 | 79 70 65 64 20 63 6f 6d |lly be t|yped com|
|00001d40| 70 6c 65 74 65 6c 79 20 | 20 28 65 2e 67 2e 20 20 |pletely | (e.g. |
|00001d50| 6e 6f 20 20 7c 0d 20 20 | 20 20 20 61 62 62 72 65 |no |. | abbre|
|00001d60| 76 69 61 74 69 6f 6e 73 | 29 2e 20 20 20 48 6f 77 |viations|). How|
|00001d70| 65 76 65 72 2c 20 20 69 | 66 20 20 74 68 65 20 20 |ever, i|f the |
|00001d80| 54 63 6c 20 20 69 6e 74 | 65 72 70 72 65 74 65 72 |Tcl int|erpreter|
|00001d90| 20 63 61 6e 6e 6f 74 20 | 20 7c 0d 20 20 20 20 20 | cannot | |. |
|00001da0| 6c 6f 63 61 74 65 20 61 | 20 63 6f 6d 6d 61 6e 64 |locate a| command|
|00001db0| 20 69 74 20 69 6e 76 6f | 6b 65 73 20 61 20 73 70 | it invo|kes a sp|
|00001dc0| 65 63 69 61 6c 20 63 6f | 6d 6d 61 6e 64 20 6e 61 |ecial co|mmand na|
|00001dd0| 6d 65 64 20 20 75 6e 6b | 6e 6f 77 6e 20 20 7c 0d |med unk|nown |.|
|00001de0| 20 20 20 20 20 77 68 69 | 63 68 20 20 61 74 74 65 | whi|ch atte|
|00001df0| 6d 70 74 73 20 74 6f 20 | 66 69 6e 64 20 6f 72 20 |mpts to |find or |
|00001e00| 63 72 65 61 74 65 20 74 | 68 65 20 63 6f 6d 6d 61 |create t|he comma|
|00001e10| 6e 64 2e 20 20 46 6f 72 | 20 65 78 61 6d 70 6c 65 |nd. For| example|
|00001e20| 2c 20 20 7c 0d 20 20 20 | 20 20 61 74 20 6d 61 6e |, |. | at man|
|00001e30| 79 20 73 69 74 65 73 20 | 75 6e 6b 6e 6f 77 6e 20 |y sites |unknown |
|00001e40| 77 69 6c 6c 20 20 73 65 | 61 72 63 68 20 20 74 68 |will se|arch th|
|00001e50| 72 6f 75 67 68 20 20 6c | 69 62 72 61 72 79 20 20 |rough l|ibrary |
|00001e60| 64 69 72 65 63 2d 20 20 | 7c 0d 20 20 20 20 20 74 |direc- ||. t|
|00001e70| 6f 72 69 65 73 20 20 66 | 6f 72 20 20 74 68 65 20 |ories f|or the |
|00001e80| 64 65 73 69 72 65 64 20 | 63 6f 6d 6d 61 6e 64 20 |desired |command |
|00001e90| 61 6e 64 20 63 72 65 61 | 74 65 20 69 74 20 61 73 |and crea|te it as|
|00001ea0| 20 61 20 54 63 6c 20 70 | 72 6f 2d 20 20 7c 0d 20 | a Tcl p|ro- |. |
|00001eb0| 20 20 20 20 63 65 64 75 | 72 65 20 69 66 20 69 74 | cedu|re if it|
|00001ec0| 20 69 73 20 66 6f 75 6e | 64 2e 20 20 54 68 65 20 | is foun|d. The |
|00001ed0| 75 6e 6b 6e 6f 77 6e 20 | 63 6f 6d 6d 61 6e 64 20 |unknown |command |
|00001ee0| 20 6f 66 74 65 6e 20 20 | 70 72 6f 76 69 64 65 73 | often |provides|
|00001ef0| 20 20 7c 0d 20 20 20 20 | 20 61 75 74 6f 6d 61 74 | |. | automat|
|00001f00| 69 63 20 20 63 6f 6d 70 | 6c 65 74 69 6f 6e 20 20 |ic comp|letion |
|00001f10| 6f 66 20 20 61 62 62 72 | 65 76 69 61 74 65 64 20 |of abbr|eviated |
|00001f20| 63 6f 6d 6d 61 6e 64 73 | 2c 20 62 75 74 20 75 73 |commands|, but us|
|00001f30| 75 61 6c 6c 79 20 20 7c | 0d 20 20 20 20 20 6f 6e |ually ||. on|
|00001f40| 6c 79 20 66 6f 72 20 63 | 6f 6d 6d 61 6e 64 73 20 |ly for c|ommands |
|00001f50| 74 68 61 74 20 77 65 72 | 65 20 74 79 70 65 64 20 |that wer|e typed |
|00001f60| 69 6e 74 65 72 61 63 74 | 69 76 65 6c 79 2e 20 20 |interact|ively. |
|00001f70| 49 74 27 73 20 70 72 6f | 62 2d 20 20 7c 0d 20 20 |It's pro|b- |. |
|00001f80| 20 20 20 61 62 6c 79 20 | 20 61 20 62 61 64 20 69 | ably | a bad i|
|00001f90| 64 65 61 20 74 6f 20 75 | 73 65 20 61 62 62 72 65 |dea to u|se abbre|
|00001fa0| 76 69 61 74 69 6f 6e 73 | 20 69 6e 20 63 6f 6d 6d |viations| in comm|
|00001fb0| 61 6e 64 20 73 63 72 69 | 70 74 73 20 61 6e 64 20 |and scri|pts and |
|00001fc0| 20 7c 0d 20 20 20 20 20 | 6f 74 68 65 72 20 66 6f | |. |other fo|
|00001fd0| 72 6d 73 20 74 68 61 74 | 20 77 69 6c 6c 20 62 65 |rms that| will be|
|00001fe0| 20 72 65 2d 75 73 65 64 | 20 6f 76 65 72 20 74 69 | re-used| over ti|
|00001ff0| 6d 65 3a 20 20 63 68 61 | 6e 67 65 73 20 74 6f 20 |me: cha|nges to |
|00002000| 20 74 68 65 20 20 7c 0d | 20 20 20 20 20 63 6f 6d | the |.| com|
|00002010| 6d 61 6e 64 20 20 73 65 | 74 20 20 6d 61 79 20 20 |mand se|t may |
|00002020| 63 61 75 73 65 20 20 61 | 62 62 72 65 76 69 61 74 |cause a|bbreviat|
|00002030| 69 6f 6e 73 20 74 6f 20 | 62 65 63 6f 6d 65 20 61 |ions to |become a|
|00002040| 6d 62 69 67 75 6f 75 73 | 2c 20 20 7c 0d 20 20 20 |mbiguous|, |. |
|00002050| 20 20 72 65 73 75 6c 74 | 69 6e 67 20 69 6e 20 73 | result|ing in s|
|00002060| 63 72 69 70 74 73 20 74 | 68 61 74 20 6e 6f 20 6c |cripts t|hat no l|
|00002070| 6f 6e 67 65 72 20 77 6f | 72 6b 2e 0d 0d 0d 43 4f |onger wo|rk....CO|
|00002080| 4d 4d 45 4e 54 53 0d 20 | 20 20 20 20 49 66 20 74 |MMENTS. | If t|
|00002090| 68 65 20 66 69 72 73 74 | 20 6e 6f 6e 2d 62 6c 61 |he first| non-bla|
|000020a0| 6e 6b 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |nk chara|cter in |
|000020b0| 61 20 20 63 6f 6d 6d 61 | 6e 64 20 20 69 73 20 20 |a comma|nd is |
|000020c0| 23 2c 20 20 74 68 65 6e | 0d 20 20 20 20 20 65 76 |#, then|. ev|
|000020d0| 65 72 79 74 68 69 6e 67 | 20 20 66 72 6f 6d 20 74 |erything| from t|
|000020e0| 68 65 20 23 20 75 70 20 | 74 68 72 6f 75 67 68 20 |he # up |through |
|000020f0| 74 68 65 20 6e 65 78 74 | 20 6e 65 77 6c 69 6e 65 |the next| newline|
|00002100| 20 63 68 61 72 61 63 74 | 65 72 0d 20 20 20 20 20 | charact|er. |
|00002110| 69 73 20 74 72 65 61 74 | 65 64 20 61 73 20 61 20 |is treat|ed as a |
|00002120| 63 6f 6d 6d 65 6e 74 20 | 20 61 6e 64 20 20 69 67 |comment | and ig|
|00002130| 6e 6f 72 65 64 2e 20 20 | 20 57 68 65 6e 20 20 63 |nored. | When c|
|00002140| 6f 6d 6d 65 6e 74 73 20 | 20 61 72 65 0d 20 20 20 |omments | are. |
|00002150| 20 20 65 6d 62 65 64 64 | 65 64 20 20 69 6e 73 69 | embedd|ed insi|
|00002160| 64 65 20 20 6e 65 73 74 | 65 64 20 20 63 6f 6d 6d |de nest|ed comm|
|00002170| 61 6e 64 73 20 20 28 65 | 2e 67 2e 20 66 69 65 6c |ands (e|.g. fiel|
|00002180| 64 73 20 65 6e 63 6c 6f | 73 65 64 20 69 6e 0d 20 |ds enclo|sed in. |
|00002190| 20 20 20 20 62 72 61 63 | 65 73 29 20 74 68 65 79 | brac|es) they|
|000021a0| 20 6d 75 73 74 20 20 68 | 61 76 65 20 20 70 72 6f | must h|ave pro|
|000021b0| 70 65 72 6c 79 2d 6d 61 | 74 63 68 65 64 20 20 62 |perly-ma|tched b|
|000021c0| 72 61 63 65 73 20 20 28 | 74 68 69 73 20 20 69 73 |races (|this is|
|000021d0| 0d 20 20 20 20 20 6e 65 | 63 65 73 73 61 72 79 20 |. ne|cessary |
|000021e0| 20 62 65 63 61 75 73 65 | 20 20 77 68 65 6e 20 54 | because| when T|
|000021f0| 63 6c 20 70 61 72 73 65 | 73 20 74 68 65 20 74 6f |cl parse|s the to|
|00002200| 70 2d 6c 65 76 65 6c 20 | 63 6f 6d 6d 61 6e 64 20 |p-level |command |
|00002210| 69 74 0d 20 20 20 20 20 | 64 6f 65 73 6e 27 74 20 |it. |doesn't |
|00002220| 79 65 74 20 6b 6e 6f 77 | 20 74 68 61 74 20 74 68 |yet know| that th|
|00002230| 65 20 6e 65 73 74 65 64 | 20 66 69 65 6c 64 20 77 |e nested| field w|
|00002240| 69 6c 6c 20 20 62 65 20 | 20 75 73 65 64 20 20 61 |ill be | used a|
|00002250| 73 20 20 61 0d 20 20 20 | 20 20 63 6f 6d 6d 61 6e |s a. | comman|
|00002260| 64 20 73 6f 20 69 74 20 | 63 61 6e 6e 6f 74 20 70 |d so it |cannot p|
|00002270| 72 6f 63 65 73 73 20 74 | 68 65 20 6e 65 73 74 65 |rocess t|he neste|
|00002280| 64 20 63 6f 6d 6d 65 6e | 74 20 63 68 61 72 61 63 |d commen|t charac|
|00002290| 74 65 72 20 61 73 0d 20 | 20 20 20 20 61 20 63 6f |ter as. | a co|
|000022a0| 6d 6d 65 6e 74 29 2e 0d | 0d 0d 0d 0d 0d 53 75 6e |mment)..|.....Sun|
|000022b0| 20 52 65 6c 65 61 73 65 | 20 34 2e 31 20 20 20 20 | Release| 4.1 |
|000022c0| 20 20 20 20 20 20 20 4c | 61 73 74 20 63 68 61 6e | L|ast chan|
|000022d0| 67 65 3a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ge: | |
|000022e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 33 0d 0d | | 3..|
|000022f0| 0d 0d 0d 0d 0d 54 63 6c | 28 33 29 20 20 20 20 20 |.....Tcl|(3) |
|00002300| 20 20 20 20 20 20 20 20 | 20 20 20 20 43 20 4c 49 | | C LI|
|00002310| 42 52 41 52 59 20 46 55 | 4e 43 54 49 4f 4e 53 20 |BRARY FU|NCTIONS |
|00002320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002330| 54 63 6c 28 33 29 0d 0d | 0d 0d 47 52 4f 55 50 49 |Tcl(3)..|..GROUPI|
|00002340| 4e 47 20 41 52 47 55 4d | 45 4e 54 53 20 57 49 54 |NG ARGUM|ENTS WIT|
|00002350| 48 20 44 4f 55 42 4c 45 | 2d 51 55 4f 54 45 53 0d |H DOUBLE|-QUOTES.|
|00002360| 20 20 20 20 20 4e 6f 72 | 6d 61 6c 6c 79 20 65 61 | Nor|mally ea|
|00002370| 63 68 20 61 72 67 75 6d | 65 6e 74 20 66 69 65 6c |ch argum|ent fiel|
|00002380| 64 20 65 6e 64 73 20 61 | 74 20 74 68 65 20 6e 65 |d ends a|t the ne|
|00002390| 78 74 20 20 77 68 69 74 | 65 20 20 73 70 61 63 65 |xt whit|e space|
|000023a0| 2c 0d 20 20 20 20 20 62 | 75 74 20 20 64 6f 75 62 |,. b|ut doub|
|000023b0| 6c 65 2d 71 75 6f 74 65 | 73 20 20 6d 61 79 20 20 |le-quote|s may |
|000023c0| 62 65 20 20 75 73 65 64 | 20 20 74 6f 20 20 63 72 |be used| to cr|
|000023d0| 65 61 74 65 20 61 72 67 | 75 6d 65 6e 74 73 20 77 |eate arg|uments w|
|000023e0| 69 74 68 0d 20 20 20 20 | 20 65 6d 62 65 64 64 65 |ith. | embedde|
|000023f0| 64 20 73 70 61 63 65 2e | 20 20 49 66 20 61 6e 20 |d space.| If an |
|00002400| 61 72 67 75 6d 65 6e 74 | 20 66 69 65 6c 64 20 62 |argument| field b|
|00002410| 65 67 69 6e 73 20 77 69 | 74 68 20 61 20 20 64 6f |egins wi|th a do|
|00002420| 75 62 6c 65 2d 0d 20 20 | 20 20 20 71 75 6f 74 65 |uble-. | quote|
|00002430| 2c 20 20 74 68 65 6e 20 | 20 74 68 65 20 20 61 72 |, then | the ar|
|00002440| 67 75 6d 65 6e 74 20 20 | 69 73 6e 27 74 20 74 65 |gument |isn't te|
|00002450| 72 6d 69 6e 61 74 65 64 | 20 62 79 20 77 68 69 74 |rminated| by whit|
|00002460| 65 20 73 70 61 63 65 0d | 20 20 20 20 20 28 69 6e |e space.| (in|
|00002470| 63 6c 75 64 69 6e 67 20 | 6e 65 77 6c 69 6e 65 73 |cluding |newlines|
|00002480| 29 20 6f 72 20 61 20 73 | 65 6d 69 2d 63 6f 6c 6f |) or a s|emi-colo|
|00002490| 6e 20 28 73 65 65 20 62 | 65 6c 6f 77 20 66 6f 72 |n (see b|elow for|
|000024a0| 20 69 6e 66 6f 72 6d 61 | 2d 0d 20 20 20 20 20 74 | informa|-. t|
|000024b0| 69 6f 6e 20 20 6f 6e 20 | 20 73 65 6d 69 2d 63 6f |ion on | semi-co|
|000024c0| 6c 6f 6e 73 29 3b 20 20 | 69 6e 73 74 65 61 64 20 |lons); |instead |
|000024d0| 69 74 20 65 6e 64 73 20 | 61 74 20 74 68 65 20 6e |it ends |at the n|
|000024e0| 65 78 74 20 64 6f 75 62 | 6c 65 2d 0d 20 20 20 20 |ext doub|le-. |
|000024f0| 20 71 75 6f 74 65 20 63 | 68 61 72 61 63 74 65 72 | quote c|haracter|
|00002500| 2e 20 20 54 68 65 20 64 | 6f 75 62 6c 65 2d 71 75 |. The d|ouble-qu|
|00002510| 6f 74 65 73 20 61 72 65 | 20 6e 6f 74 20 69 6e 63 |otes are| not inc|
|00002520| 6c 75 64 65 64 20 69 6e | 20 20 74 68 65 0d 20 20 |luded in| the. |
|00002530| 20 20 20 72 65 73 75 6c | 74 69 6e 67 20 61 72 67 | resul|ting arg|
|00002540| 75 6d 65 6e 74 2e 20 20 | 46 6f 72 20 65 78 61 6d |ument. |For exam|
|00002550| 70 6c 65 2c 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |ple, the| command|
|00002560| 0d 0d 20 20 20 20 20 20 | 20 20 20 20 73 65 74 20 |.. | set |
|00002570| 61 20 22 54 68 69 73 20 | 69 73 20 61 20 73 69 6e |a "This |is a sin|
|00002580| 67 6c 65 20 61 72 67 75 | 6d 65 6e 74 22 0d 20 20 |gle argu|ment". |
|00002590| 20 20 20 77 69 6c 6c 20 | 70 61 73 73 20 74 77 6f | will |pass two|
|000025a0| 20 61 72 67 75 6d 65 6e | 74 73 20 74 6f 20 73 65 | argumen|ts to se|
|000025b0| 74 3a 20 20 61 20 20 61 | 6e 64 20 20 54 68 69 73 |t: a a|nd This|
|000025c0| 20 20 69 73 20 20 61 20 | 20 73 69 6e 67 6c 65 0d | is a | single.|
|000025d0| 20 20 20 20 20 61 72 67 | 75 6d 65 6e 74 2e 20 20 | arg|ument. |
|000025e0| 20 20 57 69 74 68 69 6e | 20 20 64 6f 75 62 6c 65 | Within| double|
|000025f0| 2d 71 75 6f 74 65 73 2c | 20 20 63 6f 6d 6d 61 6e |-quotes,| comman|
|00002600| 64 20 20 73 75 62 73 74 | 69 74 75 74 69 6f 6e 73 |d subst|itutions|
|00002610| 2c 0d 20 20 20 20 20 76 | 61 72 69 61 62 6c 65 20 |,. v|ariable |
|00002620| 73 75 62 73 74 69 74 75 | 74 69 6f 6e 73 2c 20 61 |substitu|tions, a|
|00002630| 6e 64 20 20 62 61 63 6b | 73 6c 61 73 68 20 20 73 |nd back|slash s|
|00002640| 75 62 73 74 69 74 75 74 | 69 6f 6e 73 20 20 73 74 |ubstitut|ions st|
|00002650| 69 6c 6c 0d 20 20 20 20 | 20 6f 63 63 75 72 2c 20 |ill. | occur, |
|00002660| 61 73 20 64 65 73 63 72 | 69 62 65 64 20 62 65 6c |as descr|ibed bel|
|00002670| 6f 77 2e 20 20 49 66 20 | 74 68 65 20 66 69 72 73 |ow. If |the firs|
|00002680| 74 20 63 68 61 72 61 63 | 74 65 72 20 6f 66 20 61 |t charac|ter of a|
|00002690| 20 63 6f 6d 2d 0d 20 20 | 20 20 20 6d 61 6e 64 20 | com-. | mand |
|000026a0| 66 69 65 6c 64 20 69 73 | 20 6e 6f 74 20 61 20 71 |field is| not a q|
|000026b0| 75 6f 74 65 2c 20 74 68 | 65 6e 20 71 75 6f 74 65 |uote, th|en quote|
|000026c0| 73 20 20 72 65 63 65 69 | 76 65 20 20 6e 6f 20 20 |s recei|ve no |
|000026d0| 73 70 65 63 69 61 6c 0d | 20 20 20 20 20 69 6e 74 |special.| int|
|000026e0| 65 72 70 72 65 74 61 74 | 69 6f 6e 20 69 6e 20 74 |erpretat|ion in t|
|000026f0| 68 65 20 70 61 72 73 69 | 6e 67 20 6f 66 20 74 68 |he parsi|ng of th|
|00002700| 61 74 20 66 69 65 6c 64 | 2e 0d 0d 0d 47 52 4f 55 |at field|....GROU|
|00002710| 50 49 4e 47 20 41 52 47 | 55 4d 45 4e 54 53 20 57 |PING ARG|UMENTS W|
|00002720| 49 54 48 20 42 52 41 43 | 45 53 0d 20 20 20 20 20 |ITH BRAC|ES. |
|00002730| 43 75 72 6c 79 20 62 72 | 61 63 65 73 20 6d 61 79 |Curly br|aces may|
|00002740| 20 61 6c 73 6f 20 62 65 | 20 75 73 65 64 20 66 6f | also be| used fo|
|00002750| 72 20 67 72 6f 75 70 69 | 6e 67 20 61 72 67 75 6d |r groupi|ng argum|
|00002760| 65 6e 74 73 2e 20 20 20 | 54 68 65 79 0d 20 20 20 |ents. |They. |
|00002770| 20 20 61 72 65 20 20 73 | 69 6d 69 6c 61 72 20 20 | are s|imilar |
|00002780| 74 6f 20 20 71 75 6f 74 | 65 73 20 65 78 63 65 70 |to quot|es excep|
|00002790| 74 20 66 6f 72 20 74 77 | 6f 20 64 69 66 66 65 72 |t for tw|o differ|
|000027a0| 65 6e 63 65 73 2e 20 20 | 46 69 72 73 74 2c 0d 20 |ences. |First,. |
|000027b0| 20 20 20 20 74 68 65 79 | 20 6e 65 73 74 3b 20 74 | they| nest; t|
|000027c0| 68 69 73 20 6d 61 6b 65 | 73 20 74 68 65 6d 20 65 |his make|s them e|
|000027d0| 61 73 69 65 72 20 20 74 | 6f 20 20 75 73 65 20 20 |asier t|o use |
|000027e0| 66 6f 72 20 20 63 6f 6d | 70 6c 69 63 61 74 65 64 |for com|plicated|
|000027f0| 0d 20 20 20 20 20 61 72 | 67 75 6d 65 6e 74 73 20 |. ar|guments |
|00002800| 6c 69 6b 65 20 6e 65 73 | 74 65 64 20 54 63 6c 20 |like nes|ted Tcl |
|00002810| 63 6f 6d 6d 61 6e 64 20 | 73 74 72 69 6e 67 73 2e |command |strings.|
|00002820| 20 20 53 65 63 6f 6e 64 | 2c 20 74 68 65 20 73 75 | Second|, the su|
|00002830| 62 2d 0d 20 20 20 20 20 | 73 74 69 74 75 74 69 6f |b-. |stitutio|
|00002840| 6e 73 20 64 65 73 63 72 | 69 62 65 64 20 20 62 65 |ns descr|ibed be|
|00002850| 6c 6f 77 20 20 66 6f 72 | 20 20 63 6f 6d 6d 61 6e |low for| comman|
|00002860| 64 73 2c 20 20 76 61 72 | 69 61 62 6c 65 73 2c 20 |ds, var|iables, |
|00002870| 20 61 6e 64 0d 20 20 20 | 20 20 62 61 63 6b 73 6c | and. | backsl|
|00002880| 61 73 68 65 73 20 64 6f | 20 6e 6f 74 20 6f 63 63 |ashes do| not occ|
|00002890| 75 72 20 69 6e 20 61 72 | 67 75 6d 65 6e 74 73 20 |ur in ar|guments |
|000028a0| 65 6e 63 6c 6f 73 65 64 | 20 69 6e 20 62 72 61 63 |enclosed| in brac|
|000028b0| 65 73 2c 20 73 6f 0d 20 | 20 20 20 20 62 72 61 63 |es, so. | brac|
|000028c0| 65 73 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 |es can b|e used t|
|000028d0| 6f 20 70 72 65 76 65 6e | 74 20 73 75 62 73 74 69 |o preven|t substi|
|000028e0| 74 75 74 69 6f 6e 73 20 | 77 68 65 72 65 20 20 74 |tutions |where t|
|000028f0| 68 65 79 20 20 61 72 65 | 0d 20 20 20 20 20 75 6e |hey are|. un|
|00002900| 64 65 73 69 72 61 62 6c | 65 2e 20 20 49 66 20 61 |desirabl|e. If a|
|00002910| 6e 20 61 72 67 75 6d 65 | 6e 74 20 66 69 65 6c 64 |n argume|nt field|
|00002920| 20 62 65 67 69 6e 73 20 | 77 69 74 68 20 61 20 6c | begins |with a l|
|00002930| 65 66 74 20 62 72 61 63 | 65 2c 0d 20 20 20 20 20 |eft brac|e,. |
|00002940| 74 68 65 6e 20 74 68 65 | 20 61 72 67 75 6d 65 6e |then the| argumen|
|00002950| 74 20 65 6e 64 73 20 61 | 74 20 74 68 65 20 20 6d |t ends a|t the m|
|00002960| 61 74 63 68 69 6e 67 20 | 20 72 69 67 68 74 20 20 |atching | right |
|00002970| 62 72 61 63 65 2e 20 20 | 20 54 63 6c 0d 20 20 20 |brace. | Tcl. |
|00002980| 20 20 77 69 6c 6c 20 20 | 73 74 72 69 70 20 20 6f | will |strip o|
|00002990| 66 66 20 20 74 68 65 20 | 6f 75 74 65 72 6d 6f 73 |ff the |outermos|
|000029a0| 74 20 6c 61 79 65 72 20 | 6f 66 20 62 72 61 63 65 |t layer |of brace|
|000029b0| 73 20 61 6e 64 20 70 61 | 73 73 20 74 68 65 0d 20 |s and pa|ss the. |
|000029c0| 20 20 20 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 | info|rmation |
|000029d0| 62 65 74 77 65 65 6e 20 | 74 68 65 20 62 72 61 63 |between |the brac|
|000029e0| 65 73 20 74 6f 20 74 68 | 65 20 20 63 6f 6d 6d 61 |es to th|e comma|
|000029f0| 6e 64 20 20 77 69 74 68 | 6f 75 74 20 20 61 6e 79 |nd with|out any|
|00002a00| 0d 20 20 20 20 20 66 75 | 72 74 68 65 72 20 6d 6f |. fu|rther mo|
|00002a10| 64 69 66 69 63 61 74 69 | 6f 6e 2e 20 20 46 6f 72 |dificati|on. For|
|00002a20| 20 65 78 61 6d 70 6c 65 | 2c 20 69 6e 20 74 68 65 | example|, in the|
|00002a30| 20 63 6f 6d 6d 61 6e 64 | 0d 0d 20 20 20 20 20 20 | command|.. |
|00002a40| 20 20 20 20 73 65 74 20 | 61 20 7b 78 79 7a 20 61 | set |a {xyz a|
|00002a50| 20 7b 62 20 63 20 64 7d | 7d 0d 20 20 20 20 20 74 | {b c d}|}. t|
|00002a60| 68 65 20 73 65 74 20 63 | 6f 6d 6d 61 6e 64 20 77 |he set c|ommand w|
|00002a70| 69 6c 6c 20 72 65 63 65 | 69 76 65 20 74 77 6f 20 |ill rece|ive two |
|00002a80| 61 72 67 75 6d 65 6e 74 | 73 3a 20 61 20 61 6e 64 |argument|s: a and|
|00002a90| 20 78 79 7a 20 61 20 7b | 62 20 63 0d 20 20 20 20 | xyz a {|b c. |
|00002aa0| 20 64 7d 2e 0d 0d 20 20 | 20 20 20 57 68 65 6e 20 | d}... | When |
|00002ab0| 62 72 61 63 65 73 20 6f | 72 20 71 75 6f 74 65 73 |braces o|r quotes|
|00002ac0| 20 61 72 65 20 69 6e 20 | 65 66 66 65 63 74 2c 20 | are in |effect, |
|00002ad0| 74 68 65 20 6d 61 74 63 | 68 69 6e 67 20 20 62 72 |the matc|hing br|
|00002ae0| 61 63 65 20 20 6f 72 0d | 20 20 20 20 20 71 75 6f |ace or.| quo|
|00002af0| 74 65 20 20 6e 65 65 64 | 20 6e 6f 74 20 62 65 20 |te need| not be |
|00002b00| 6f 6e 20 74 68 65 20 73 | 61 6d 65 20 6c 69 6e 65 |on the s|ame line|
|00002b10| 20 61 73 20 74 68 65 20 | 73 74 61 72 74 69 6e 67 | as the |starting|
|00002b20| 20 71 75 6f 74 65 20 6f | 72 0d 20 20 20 20 20 62 | quote o|r. b|
|00002b30| 72 61 63 65 3b 20 69 6e | 20 74 68 69 73 20 63 61 |race; in| this ca|
|00002b40| 73 65 20 74 68 65 20 6e | 65 77 6c 69 6e 65 20 20 |se the n|ewline |
|00002b50| 77 69 6c 6c 20 20 62 65 | 20 20 69 6e 63 6c 75 64 |will be| includ|
|00002b60| 65 64 20 20 69 6e 20 20 | 74 68 65 0d 20 20 20 20 |ed in |the. |
|00002b70| 20 61 72 67 75 6d 65 6e | 74 20 20 66 69 65 6c 64 | argumen|t field|
|00002b80| 20 20 61 6c 6f 6e 67 20 | 20 77 69 74 68 20 20 61 | along | with a|
|00002b90| 6e 79 20 6f 74 68 65 72 | 20 63 68 61 72 61 63 74 |ny other| charact|
|00002ba0| 65 72 73 20 75 70 20 74 | 6f 20 74 68 65 0d 20 20 |ers up t|o the. |
|00002bb0| 20 20 20 6d 61 74 63 68 | 69 6e 67 20 62 72 61 63 | match|ing brac|
|00002bc0| 65 20 6f 72 20 71 75 6f | 74 65 2e 20 20 20 46 6f |e or quo|te. Fo|
|00002bd0| 72 20 20 65 78 61 6d 70 | 6c 65 2c 20 20 74 68 65 |r examp|le, the|
|00002be0| 20 20 65 76 61 6c 20 20 | 63 6f 6d 6d 61 6e 64 0d | eval |command.|
|00002bf0| 20 20 20 20 20 74 61 6b | 65 73 20 20 6f 6e 65 20 | tak|es one |
|00002c00| 61 72 67 75 6d 65 6e 74 | 2c 20 77 68 69 63 68 20 |argument|, which |
|00002c10| 69 73 20 61 20 63 6f 6d | 6d 61 6e 64 20 73 74 72 |is a com|mand str|
|00002c20| 69 6e 67 3b 20 65 76 61 | 6c 20 69 6e 76 6f 6b 65 |ing; eva|l invoke|
|00002c30| 73 0d 20 20 20 20 20 74 | 68 65 20 54 63 6c 20 69 |s. t|he Tcl i|
|00002c40| 6e 74 65 72 70 72 65 74 | 65 72 20 74 6f 20 65 78 |nterpret|er to ex|
|00002c50| 65 63 75 74 65 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ecute th|e comman|
|00002c60| 64 20 73 74 72 69 6e 67 | 2e 20 20 54 68 65 20 63 |d string|. The c|
|00002c70| 6f 6d 2d 0d 20 20 20 20 | 20 6d 61 6e 64 0d 0d 20 |om-. | mand.. |
|00002c80| 20 20 20 20 20 20 20 20 | 20 65 76 61 6c 20 7b 0d | | eval {.|
|00002c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00002ca0| 65 74 20 61 20 32 32 0d | 20 20 20 20 20 20 20 20 |et a 22.| |
|00002cb0| 20 20 20 20 20 20 20 73 | 65 74 20 62 20 33 33 0d | s|et b 33.|
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 | | }. |
|00002cd0| 20 77 69 6c 6c 20 61 73 | 73 69 67 6e 20 74 68 65 | will as|sign the|
|00002ce0| 20 76 61 6c 75 65 20 32 | 32 20 74 6f 20 61 20 61 | value 2|2 to a a|
|00002cf0| 6e 64 20 33 33 20 74 6f | 20 62 2e 0d 0d 0d 0d 53 |nd 33 to| b.....S|
|00002d00| 75 6e 20 52 65 6c 65 61 | 73 65 20 34 2e 31 20 20 |un Relea|se 4.1 |
|00002d10| 20 20 20 20 20 20 20 20 | 20 4c 61 73 74 20 63 68 | | Last ch|
|00002d20| 61 6e 67 65 3a 20 20 20 | 20 20 20 20 20 20 20 20 |ange: | |
|00002d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 34 | | 4|
|00002d40| 0d 0d 0d 0d 0d 0d 54 63 | 6c 28 33 29 20 20 20 20 |......Tc|l(3) |
|00002d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 20 4c | | C L|
|00002d60| 49 42 52 41 52 59 20 46 | 55 4e 43 54 49 4f 4e 53 |IBRARY F|UNCTIONS|
|00002d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d80| 20 54 63 6c 28 33 29 0d | 0d 0d 0d 20 20 20 20 20 | Tcl(3).|... |
|00002d90| 49 66 20 74 68 65 20 66 | 69 72 73 74 20 63 68 61 |If the f|irst cha|
|00002da0| 72 61 63 74 65 72 20 6f | 66 20 61 20 63 6f 6d 6d |racter o|f a comm|
|00002db0| 61 6e 64 20 20 66 69 65 | 6c 64 20 20 69 73 20 20 |and fie|ld is |
|00002dc0| 6e 6f 74 20 20 61 20 20 | 6c 65 66 74 0d 20 20 20 |not a |left. |
|00002dd0| 20 20 62 72 61 63 65 2c | 20 20 74 68 65 6e 20 6e | brace,| then n|
|00002de0| 65 69 74 68 65 72 20 6c | 65 66 74 20 6e 6f 72 20 |either l|eft nor |
|00002df0| 72 69 67 68 74 20 62 72 | 61 63 65 73 20 69 6e 20 |right br|aces in |
|00002e00| 74 68 65 20 66 69 65 6c | 64 20 77 69 6c 6c 0d 20 |the fiel|d will. |
|00002e10| 20 20 20 20 62 65 20 74 | 72 65 61 74 65 64 20 73 | be t|reated s|
|00002e20| 70 65 63 69 61 6c 6c 79 | 20 28 65 78 63 65 70 74 |pecially| (except|
|00002e30| 20 61 73 20 70 61 72 74 | 20 6f 66 20 20 76 61 72 | as part| of var|
|00002e40| 69 61 62 6c 65 20 20 73 | 75 62 73 74 69 74 75 2d |iable s|ubstitu-|
|00002e50| 0d 20 20 20 20 20 74 69 | 6f 6e 3b 20 73 65 65 20 |. ti|on; see |
|00002e60| 62 65 6c 6f 77 29 2e 0d | 0d 0d 43 4f 4d 4d 41 4e |below)..|..COMMAN|
|00002e70| 44 20 53 55 42 53 54 49 | 54 55 54 49 4f 4e 20 57 |D SUBSTI|TUTION W|
|00002e80| 49 54 48 20 42 52 41 43 | 4b 45 54 53 0d 20 20 20 |ITH BRAC|KETS. |
|00002e90| 20 20 49 66 20 61 6e 20 | 6f 70 65 6e 20 62 72 61 | If an |open bra|
|00002ea0| 63 6b 65 74 20 6f 63 63 | 75 72 73 20 69 6e 20 61 |cket occ|urs in a|
|00002eb0| 20 66 69 65 6c 64 20 6f | 66 20 61 20 63 6f 6d 6d | field o|f a comm|
|00002ec0| 61 6e 64 2c 20 74 68 65 | 6e 20 63 6f 6d 2d 0d 20 |and, the|n com-. |
|00002ed0| 20 20 20 20 6d 61 6e 64 | 20 20 73 75 62 73 74 69 | mand| substi|
|00002ee0| 74 75 74 69 6f 6e 20 20 | 6f 63 63 75 72 73 20 20 |tution |occurs |
|00002ef0| 28 65 78 63 65 70 74 20 | 20 66 6f 72 20 20 66 69 |(except | for fi|
|00002f00| 65 6c 64 73 20 65 6e 63 | 6c 6f 73 65 64 20 69 6e |elds enc|losed in|
|00002f10| 0d 20 20 20 20 20 62 72 | 61 63 65 73 29 2e 20 20 |. br|aces). |
|00002f20| 41 6c 6c 20 6f 66 20 74 | 68 65 20 74 65 78 74 20 |All of t|he text |
|00002f30| 75 70 20 74 6f 20 74 68 | 65 20 6d 61 74 63 68 69 |up to th|e matchi|
|00002f40| 6e 67 20 20 63 6c 6f 73 | 65 20 20 62 72 61 63 6b |ng clos|e brack|
|00002f50| 65 74 0d 20 20 20 20 20 | 69 73 20 20 74 72 65 61 |et. |is trea|
|00002f60| 74 65 64 20 61 73 20 61 | 20 54 63 6c 20 63 6f 6d |ted as a| Tcl com|
|00002f70| 6d 61 6e 64 20 61 6e 64 | 20 65 78 65 63 75 74 65 |mand and| execute|
|00002f80| 64 20 69 6d 6d 65 64 69 | 61 74 65 6c 79 2e 20 20 |d immedi|ately. |
|00002f90| 54 68 65 6e 0d 20 20 20 | 20 20 74 68 65 20 72 65 |Then. | the re|
|00002fa0| 73 75 6c 74 20 6f 66 20 | 74 68 61 74 20 63 6f 6d |sult of |that com|
|00002fb0| 6d 61 6e 64 20 69 73 20 | 73 75 62 73 74 69 74 75 |mand is |substitu|
|00002fc0| 74 65 64 20 66 6f 72 20 | 74 68 65 20 20 62 72 61 |ted for |the bra|
|00002fd0| 63 6b 65 74 65 64 0d 20 | 20 20 20 20 74 65 78 74 |cketed. | text|
|00002fe0| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00002ff0| 63 6f 6e 73 69 64 65 72 | 20 74 68 65 20 63 6f 6d |consider| the com|
|00003000| 6d 61 6e 64 0d 0d 20 20 | 20 20 20 20 20 20 20 20 |mand.. | |
|00003010| 73 65 74 20 61 20 5b 73 | 65 74 20 62 5d 0d 20 20 |set a [s|et b]. |
|00003020| 20 20 20 57 68 65 6e 20 | 74 68 65 20 73 65 74 20 | When |the set |
|00003030| 63 6f 6d 6d 61 6e 64 20 | 68 61 73 20 6f 6e 6c 79 |command |has only|
|00003040| 20 61 20 73 69 6e 67 6c | 65 20 61 72 67 75 6d 65 | a singl|e argume|
|00003050| 6e 74 2c 20 69 74 20 20 | 69 73 20 20 74 68 65 0d |nt, it |is the.|
|00003060| 20 20 20 20 20 6e 61 6d | 65 20 20 6f 66 20 20 61 | nam|e of a|
|00003070| 20 20 76 61 72 69 61 62 | 6c 65 20 20 61 6e 64 20 | variab|le and |
|00003080| 20 73 65 74 20 72 65 74 | 75 72 6e 73 20 74 68 65 | set ret|urns the|
|00003090| 20 63 6f 6e 74 65 6e 74 | 73 20 6f 66 20 74 68 61 | content|s of tha|
|000030a0| 74 0d 20 20 20 20 20 76 | 61 72 69 61 62 6c 65 2e |t. v|ariable.|
|000030b0| 20 20 49 6e 20 74 68 69 | 73 20 63 61 73 65 2c 20 | In thi|s case, |
|000030c0| 69 66 20 76 61 72 69 61 | 62 6c 65 20 62 20 68 61 |if varia|ble b ha|
|000030d0| 73 20 20 74 68 65 20 20 | 76 61 6c 75 65 20 20 66 |s the |value f|
|000030e0| 6f 6f 2c 0d 20 20 20 20 | 20 74 68 65 6e 20 74 68 |oo,. | then th|
|000030f0| 65 20 63 6f 6d 6d 61 6e | 64 20 61 62 6f 76 65 20 |e comman|d above |
|00003100| 69 73 20 65 71 75 69 76 | 61 6c 65 6e 74 20 74 6f |is equiv|alent to|
|00003110| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 0d 0d 20 20 | the com|mand.. |
|00003120| 20 20 20 20 20 20 20 20 | 73 65 74 20 61 20 66 6f | |set a fo|
|00003130| 6f 0d 20 20 20 20 20 42 | 72 61 63 6b 65 74 73 20 |o. B|rackets |
|00003140| 63 61 6e 20 62 65 20 75 | 73 65 64 20 69 6e 20 6d |can be u|sed in m|
|00003150| 6f 72 65 20 63 6f 6d 70 | 6c 65 78 20 77 61 79 73 |ore comp|lex ways|
|00003160| 2e 20 20 46 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |. For e|xample, |
|00003170| 20 69 66 0d 20 20 20 20 | 20 74 68 65 20 20 76 61 | if. | the va|
|00003180| 72 69 61 62 6c 65 20 62 | 20 68 61 73 20 74 68 65 |riable b| has the|
|00003190| 20 76 61 6c 75 65 20 66 | 6f 6f 20 61 6e 64 20 74 | value f|oo and t|
|000031a0| 68 65 20 76 61 72 69 61 | 62 6c 65 20 63 20 68 61 |he varia|ble c ha|
|000031b0| 73 20 74 68 65 0d 20 20 | 20 20 20 76 61 6c 75 65 |s the. | value|
|000031c0| 20 67 6f 72 70 2c 20 74 | 68 65 6e 20 74 68 65 20 | gorp, t|hen the |
|000031d0| 63 6f 6d 6d 61 6e 64 0d | 0d 20 20 20 20 20 20 20 |command.|. |
|000031e0| 20 20 20 73 65 74 20 61 | 20 78 79 7a 5b 73 65 74 | set a| xyz[set|
|000031f0| 20 62 5d 2e 5b 73 65 74 | 20 63 5d 0d 20 20 20 20 | b].[set| c]. |
|00003200| 20 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 | is equi|valent t|
|00003210| 6f 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 0d 0d 20 |o the co|mmand.. |
|00003220| 20 20 20 20 20 20 20 20 | 20 73 65 74 20 61 20 78 | | set a x|
|00003230| 79 7a 66 6f 6f 2e 67 6f | 72 70 0d 20 20 20 20 20 |yzfoo.go|rp. |
|00003240| 41 20 62 72 61 63 6b 65 | 74 65 64 20 63 6f 6d 6d |A bracke|ted comm|
|00003250| 61 6e 64 20 6d 61 79 20 | 63 6f 6e 74 61 69 6e 20 |and may |contain |
|00003260| 6d 75 6c 74 69 70 6c 65 | 20 63 6f 6d 6d 61 6e 64 |multiple| command|
|00003270| 73 20 20 73 65 70 61 72 | 61 74 65 64 20 20 7c 0d |s separ|ated |.|
|00003280| 20 20 20 20 20 62 79 20 | 20 6e 65 77 6c 69 6e 65 | by | newline|
|00003290| 73 20 20 6f 72 20 20 73 | 65 6d 69 2d 63 6f 6c 6f |s or s|emi-colo|
|000032a0| 6e 73 20 69 6e 20 74 68 | 65 20 75 73 75 61 6c 20 |ns in th|e usual |
|000032b0| 66 61 73 68 69 6f 6e 2e | 20 20 49 6e 20 74 68 69 |fashion.| In thi|
|000032c0| 73 20 20 7c 0d 20 20 20 | 20 20 63 61 73 65 20 74 |s |. | case t|
|000032d0| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |he value| of the |
|000032e0| 6c 61 73 74 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |last com|mand is |
|000032f0| 75 73 65 64 20 66 6f 72 | 20 73 75 62 73 74 69 74 |used for| substit|
|00003300| 75 74 69 6f 6e 2e 20 20 | 7c 0d 20 20 20 20 20 46 |ution. ||. F|
|00003310| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |or examp|le, the |
|00003320| 63 6f 6d 6d 61 6e 64 20 | 20 20 20 20 20 20 20 20 |command | |
|00003330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0d 0d | | |..|
|00003350| 20 20 20 20 20 20 20 20 | 20 20 73 65 74 20 61 20 | | set a |
|00003360| 78 5b 73 65 74 20 62 20 | 32 32 20 20 20 20 20 20 |x[set b |22 |
|00003370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003390| 20 20 20 7c 0d 20 20 20 | 20 20 20 20 20 20 20 65 | |. | e|
|000033a0| 78 70 72 20 24 62 2b 32 | 5d 78 20 20 20 20 20 20 |xpr $b+2|]x |
|000033b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033d0| 20 20 20 20 20 20 20 20 | 7c 0d 20 20 20 20 20 69 | ||. i|
|000033e0| 73 20 65 71 75 69 76 61 | 6c 65 6e 74 20 74 6f 20 |s equiva|lent to |
|000033f0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 20 20 20 20 |the comm|and |
|00003400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0d 0d | | |..|
|00003420| 20 20 20 20 20 20 20 20 | 20 20 73 65 74 20 61 20 | | set a |
|00003430| 78 32 34 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |x24x | |
|00003440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003460| 20 20 20 7c 0d 20 20 20 | 20 20 49 66 20 61 20 66 | |. | If a f|
|00003470| 69 65 6c 64 20 69 73 20 | 65 6e 63 6c 6f 73 65 64 |ield is |enclosed|
|00003480| 20 69 6e 20 62 72 61 63 | 65 73 20 74 68 65 6e 20 | in brac|es then |
|00003490| 74 68 65 20 62 72 61 63 | 6b 65 74 73 20 20 61 6e |the brac|kets an|
|000034a0| 64 20 20 74 68 65 0d 20 | 20 20 20 20 63 68 61 72 |d the. | char|
|000034b0| 61 63 74 65 72 73 20 20 | 62 65 74 77 65 65 6e 20 |acters |between |
|000034c0| 74 68 65 6d 20 61 72 65 | 20 6e 6f 74 20 69 6e 74 |them are| not int|
|000034d0| 65 72 70 72 65 74 65 64 | 20 73 70 65 63 69 61 6c |erpreted| special|
|000034e0| 6c 79 3b 20 74 68 65 79 | 0d 20 20 20 20 20 61 72 |ly; they|. ar|
|000034f0| 65 20 70 61 73 73 65 64 | 20 74 68 72 6f 75 67 68 |e passed| through|
|00003500| 20 74 6f 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 | to the |argument|
|00003510| 20 76 65 72 62 61 74 69 | 6d 2e 0d 0d 0d 56 41 52 | verbati|m....VAR|
|00003520| 49 41 42 4c 45 20 53 55 | 42 53 54 49 54 55 54 49 |IABLE SU|BSTITUTI|
|00003530| 4f 4e 20 57 49 54 48 20 | 24 0d 20 20 20 20 20 54 |ON WITH |$. T|
|00003540| 68 65 20 64 6f 6c 6c 61 | 72 20 73 69 67 6e 20 28 |he dolla|r sign (|
|00003550| 24 29 20 6d 61 79 20 62 | 65 20 75 73 65 64 20 61 |$) may b|e used a|
|00003560| 73 20 61 20 73 70 65 63 | 69 61 6c 20 73 68 6f 72 |s a spec|ial shor|
|00003570| 74 68 61 6e 64 20 20 66 | 6f 72 6d 0d 20 20 20 20 |thand f|orm. |
|00003580| 20 66 6f 72 20 20 73 75 | 62 73 74 69 74 75 74 69 | for su|bstituti|
|00003590| 6e 67 20 76 61 72 69 61 | 62 6c 65 20 76 61 6c 75 |ng varia|ble valu|
|000035a0| 65 73 2e 20 20 49 66 20 | 24 20 61 70 70 65 61 72 |es. If |$ appear|
|000035b0| 73 20 69 6e 20 61 6e 20 | 61 72 67 75 2d 0d 20 20 |s in an |argu-. |
|000035c0| 20 20 20 6d 65 6e 74 20 | 74 68 61 74 20 69 73 6e | ment |that isn|
|000035d0| 27 74 20 65 6e 63 6c 6f | 73 65 64 20 69 6e 20 62 |'t enclo|sed in b|
|000035e0| 72 61 63 65 73 20 74 68 | 65 6e 20 20 76 61 72 69 |races th|en vari|
|000035f0| 61 62 6c 65 20 20 73 75 | 62 73 74 69 74 75 2d 0d |able su|bstitu-.|
|00003600| 20 20 20 20 20 74 69 6f | 6e 20 20 77 69 6c 6c 20 | tio|n will |
|00003610| 20 6f 63 63 75 72 2e 20 | 20 20 54 68 65 20 20 63 | occur. | The c|
|00003620| 68 61 72 61 63 74 65 72 | 73 20 20 61 66 74 65 72 |haracter|s after|
|00003630| 20 74 68 65 20 24 2c 20 | 75 70 20 74 6f 20 74 68 | the $, |up to th|
|00003640| 65 0d 0d 0d 0d 53 75 6e | 20 52 65 6c 65 61 73 65 |e....Sun| Release|
|00003650| 20 34 2e 31 20 20 20 20 | 20 20 20 20 20 20 20 4c | 4.1 | L|
|00003660| 61 73 74 20 63 68 61 6e | 67 65 3a 20 20 20 20 20 |ast chan|ge: |
|00003670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003680| 20 20 20 20 20 35 0d 0d | 0d 0d 0d 0d 0d 54 63 6c | 5..|.....Tcl|
|00003690| 28 33 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(3) | |
|000036a0| 20 20 20 20 43 20 4c 49 | 42 52 41 52 59 20 46 55 | C LI|BRARY FU|
|000036b0| 4e 43 54 49 4f 4e 53 20 | 20 20 20 20 20 20 20 20 |NCTIONS | |
|000036c0| 20 20 20 20 20 20 20 20 | 54 63 6c 28 33 29 0d 0d | |Tcl(3)..|
|000036d0| 0d 0d 20 20 20 20 20 66 | 69 72 73 74 20 63 68 61 |.. f|irst cha|
|000036e0| 72 61 63 74 65 72 20 74 | 68 61 74 20 69 73 6e 27 |racter t|hat isn'|
|000036f0| 74 20 61 20 6e 75 6d 62 | 65 72 2c 20 6c 65 74 74 |t a numb|er, lett|
|00003700| 65 72 2c 20 6f 72 20 20 | 75 6e 64 65 72 73 63 6f |er, or |undersco|
|00003710| 72 65 2c 0d 20 20 20 20 | 20 61 72 65 20 20 74 61 |re,. | are ta|
|00003720| 6b 65 6e 20 20 61 73 20 | 20 61 20 76 61 72 69 61 |ken as | a varia|
|00003730| 62 6c 65 20 6e 61 6d 65 | 20 61 6e 64 20 74 68 65 |ble name| and the|
|00003740| 20 73 74 72 69 6e 67 20 | 76 61 6c 75 65 20 6f 66 | string |value of|
|00003750| 20 74 68 61 74 0d 20 20 | 20 20 20 76 61 72 69 61 | that. | varia|
|00003760| 62 6c 65 20 69 73 20 73 | 75 62 73 74 69 74 75 74 |ble is s|ubstitut|
|00003770| 65 64 20 66 6f 72 20 74 | 68 65 20 6e 61 6d 65 2e |ed for t|he name.|
|00003780| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 69 | For ex|ample, i|
|00003790| 66 20 76 61 72 69 2d 20 | 20 7c 0d 20 20 20 20 20 |f vari- | |. |
|000037a0| 61 62 6c 65 20 66 6f 6f | 20 68 61 73 20 74 68 65 |able foo| has the|
|000037b0| 20 76 61 6c 75 65 20 74 | 65 73 74 2c 20 74 68 65 | value t|est, the|
|000037c0| 6e 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 20 20 |n the co|mmand |
|000037d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 0d | | |.|
|000037e0| 0d 20 20 20 20 20 20 20 | 20 20 20 73 65 74 20 61 |. | set a|
|000037f0| 20 24 66 6f 6f 2e 63 20 | 20 20 20 20 20 20 20 20 | $foo.c | |
|00003800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003820| 20 20 20 20 7c 0d 20 20 | 20 20 20 69 73 20 65 71 | |. | is eq|
|00003830| 75 69 76 61 6c 65 6e 74 | 20 74 6f 20 74 68 65 20 |uivalent| to the |
|00003840| 63 6f 6d 6d 61 6e 64 20 | 20 20 20 20 20 20 20 20 |command | |
|00003850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003860| 20 20 20 20 20 20 20 20 | 20 7c 0d 0d 20 20 20 20 | | |.. |
|00003870| 20 20 20 20 20 20 73 65 | 74 20 61 20 74 65 73 74 | se|t a test|
|00003880| 2e 63 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.c | |
|00003890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000038a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7c | | ||
|000038b0| 0d 0d 20 20 20 20 20 54 | 68 65 72 65 20 61 72 65 |.. T|here are|
|000038c0| 20 74 77 6f 20 73 70 65 | 63 69 61 6c 20 66 6f 72 | two spe|cial for|
|000038d0| 6d 73 20 66 6f 72 20 76 | 61 72 69 61 62 6c 65 20 |ms for v|ariable |
|000038e0| 20 73 75 62 73 74 69 74 | 75 74 69 6f 6e 2e 20 20 | substit|ution. |
|000038f0| 20 49 66 20 20 7c 0d 20 | 20 20 20 20 74 68 65 20 | If |. | the |
|00003900| 6e 65 78 74 20 63 68 61 | 72 61 63 74 65 72 20 61 |next cha|racter a|
|00003910| 66 74 65 72 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |fter the| name of|
|00003920| 20 74 68 65 20 76 61 72 | 69 61 62 6c 65 20 69 73 | the var|iable is|
|00003930| 20 61 6e 20 6f 70 65 6e | 20 20 7c 0d 20 20 20 20 | an open| |. |
|00003940| 20 70 61 72 65 6e 74 68 | 65 73 69 73 2c 20 74 68 | parenth|esis, th|
|00003950| 65 6e 20 74 68 65 20 76 | 61 72 69 61 62 6c 65 20 |en the v|ariable |
|00003960| 69 73 20 61 73 73 75 6d | 65 64 20 20 74 6f 20 20 |is assum|ed to |
|00003970| 62 65 20 20 61 6e 20 20 | 61 72 72 61 79 20 20 7c |be an |array ||
|00003980| 0d 20 20 20 20 20 6e 61 | 6d 65 2c 20 61 6e 64 20 |. na|me, and |
|00003990| 61 6c 6c 20 6f 66 20 74 | 68 65 20 63 68 61 72 61 |all of t|he chara|
|000039a0| 63 74 65 72 73 20 62 65 | 74 77 65 65 6e 20 74 68 |cters be|tween th|
|000039b0| 65 20 6f 70 65 6e 20 70 | 61 72 65 6e 74 68 65 73 |e open p|arenthes|
|000039c0| 69 73 20 20 7c 0d 20 20 | 20 20 20 61 6e 64 20 74 |is |. | and t|
|000039d0| 68 65 20 6e 65 78 74 20 | 63 6c 6f 73 65 20 70 61 |he next |close pa|
|000039e0| 72 65 6e 74 68 65 73 69 | 73 20 61 72 65 20 74 61 |renthesi|s are ta|
|000039f0| 6b 65 6e 20 61 73 20 20 | 61 6e 20 20 69 6e 64 65 |ken as |an inde|
|00003a00| 78 20 20 69 6e 74 6f 20 | 20 7c 0d 20 20 20 20 20 |x into | |. |
|00003a10| 74 68 65 20 61 72 72 61 | 79 2e 20 20 43 6f 6d 6d |the arra|y. Comm|
|00003a20| 61 6e 64 20 73 75 62 73 | 74 69 74 75 74 69 6f 6e |and subs|titution|
|00003a30| 73 20 61 6e 64 20 76 61 | 72 69 61 62 6c 65 20 73 |s and va|riable s|
|00003a40| 75 62 73 74 69 74 75 74 | 69 6f 6e 73 20 20 7c 0d |ubstitut|ions |.|
|00003a50| 20 20 20 20 20 61 72 65 | 20 70 65 72 66 6f 72 6d | are| perform|
|00003a60| 65 64 20 6f 6e 20 74 68 | 65 20 20 69 6e 66 6f 72 |ed on th|e infor|
|00003a70| 6d 61 74 69 6f 6e 20 20 | 62 65 74 77 65 65 6e 20 |mation |between |
|00003a80| 20 74 68 65 20 20 70 61 | 72 65 6e 74 68 65 73 65 | the pa|renthese|
|00003a90| 73 20 20 7c 0d 20 20 20 | 20 20 62 65 66 6f 72 65 |s |. | before|
|00003aa0| 20 69 74 20 69 73 20 75 | 73 65 64 20 61 73 20 61 | it is u|sed as a|
|00003ab0| 6e 20 69 6e 64 65 78 2e | 20 20 46 6f 72 20 65 78 |n index.| For ex|
|00003ac0| 61 6d 70 6c 65 2c 20 69 | 66 20 74 68 65 20 76 61 |ample, i|f the va|
|00003ad0| 72 69 61 62 6c 65 20 20 | 7c 0d 20 20 20 20 20 78 |riable ||. x|
|00003ae0| 20 69 73 20 61 6e 20 61 | 72 72 61 79 20 77 69 74 | is an a|rray wit|
|00003af0| 68 20 6f 6e 65 20 65 6c | 65 6d 65 6e 74 20 6e 61 |h one el|ement na|
|00003b00| 6d 65 64 20 66 69 72 73 | 74 20 61 6e 64 20 76 61 |med firs|t and va|
|00003b10| 6c 75 65 20 38 37 20 20 | 61 6e 64 20 20 7c 0d 20 |lue 87 |and |. |
|00003b20| 20 20 20 20 61 6e 6f 74 | 68 65 72 20 65 6c 65 6d | anot|her elem|
|00003b30| 65 6e 74 20 6e 61 6d 65 | 64 20 31 34 20 61 6e 64 |ent name|d 14 and|
|00003b40| 20 76 61 6c 75 65 20 6d | 6f 72 65 2c 20 74 68 65 | value m|ore, the|
|00003b50| 6e 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 20 20 |n the co|mmand |
|00003b60| 20 20 7c 0d 0d 20 20 20 | 20 20 20 20 20 20 20 73 | |.. | s|
|00003b70| 65 74 20 61 20 78 79 7a | 24 78 28 66 69 72 73 74 |et a xyz|$x(first|
|00003b80| 29 7a 79 78 20 20 20 20 | 20 20 20 20 20 20 20 20 |)zyx | |
|00003b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ba0| 20 20 20 20 20 20 20 20 | 7c 0d 20 20 20 20 20 69 | ||. i|
|00003bb0| 73 20 65 71 75 69 76 61 | 6c 65 6e 74 20 74 6f 20 |s equiva|lent to |
|00003bc0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 20 20 20 20 |the comm|and |
|00003bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0d 0d | | |..|
|00003bf0| 20 20 20 20 20 20 20 20 | 20 20 73 65 74 20 61 20 | | set a |
|00003c00| 78 79 7a 38 37 7a 79 78 | 20 20 20 20 20 20 20 20 |xyz87zyx| |
|00003c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003c30| 20 20 20 7c 0d 20 20 20 | 20 20 49 66 20 74 68 65 | |. | If the|
|00003c40| 20 76 61 72 69 61 62 6c | 65 20 69 6e 64 65 78 20 | variabl|e index |
|00003c50| 68 61 73 20 74 68 65 20 | 76 61 6c 75 65 20 31 34 |has the |value 14|
|00003c60| 2c 20 74 68 65 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |, then t|he comma|
|00003c70| 6e 64 20 20 20 20 20 20 | 7c 0d 0d 20 20 20 20 20 |nd ||.. |
|00003c80| 20 20 20 20 20 73 65 74 | 20 61 20 78 79 7a 24 78 | set| a xyz$x|
|00003c90| 28 24 69 6e 64 65 78 29 | 7a 79 78 20 20 20 20 20 |($index)|zyx |
|00003ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7c 0d | | |.|
|00003cc0| 20 20 20 20 20 69 73 20 | 65 71 75 69 76 61 6c 65 | is |equivale|
|00003cd0| 6e 74 20 74 6f 20 74 68 | 65 20 63 6f 6d 6d 61 6e |nt to th|e comman|
|00003ce0| 64 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d | |
|00003cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d00| 20 20 20 7c 0d 0d 20 20 | 20 20 20 20 20 20 20 20 | |.. | |
|00003d10| 73 65 74 20 61 20 78 79 | 7a 6d 6f 72 65 7a 79 78 |set a xy|zmorezyx|
|00003d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003d40| 20 20 20 20 20 20 20 20 | 20 7c 0d 20 20 20 20 20 | | |. |
|00003d50| 46 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |For more| informa|
|00003d60| 74 69 6f 6e 20 6f 6e 20 | 61 72 72 61 79 73 2c 20 |tion on |arrays, |
|00003d70| 20 73 65 65 20 20 56 41 | 52 49 41 42 4c 45 53 20 | see VA|RIABLES |
|00003d80| 20 41 4e 44 20 20 41 52 | 52 41 59 53 20 20 7c 0d | AND AR|RAYS |.|
|00003d90| 20 20 20 20 20 62 65 6c | 6f 77 2e 20 20 20 20 20 | bel|ow. |
|00003da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003dd0| 20 20 20 7c 0d 0d 20 20 | 20 20 20 54 68 65 20 73 | |.. | The s|
|00003de0| 65 63 6f 6e 64 20 73 70 | 65 63 69 61 6c 20 66 6f |econd sp|ecial fo|
|00003df0| 72 6d 20 66 6f 72 20 76 | 61 72 69 61 62 6c 65 73 |rm for v|ariables|
|00003e00| 20 6f 63 63 75 72 73 20 | 77 68 65 6e 20 74 68 65 | occurs |when the|
|00003e10| 20 64 6f 6c 6c 61 72 20 | 20 7c 0d 20 20 20 20 20 | dollar | |. |
|00003e20| 73 69 67 6e 20 20 69 73 | 20 20 66 6f 6c 6c 6f 77 |sign is| follow|
|00003e30| 65 64 20 62 79 20 61 6e | 20 6f 70 65 6e 20 63 75 |ed by an| open cu|
|00003e40| 72 6c 79 20 62 72 61 63 | 65 2e 20 20 49 6e 20 74 |rly brac|e. In t|
|00003e50| 68 69 73 20 63 61 73 65 | 20 74 68 65 20 20 7c 0d |his case| the |.|
|00003e60| 20 20 20 20 20 76 61 72 | 69 61 62 6c 65 20 6e 61 | var|iable na|
|00003e70| 6d 65 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 61 |me consi|sts of a|
|00003e80| 6c 6c 20 74 68 65 20 63 | 68 61 72 61 63 74 65 72 |ll the c|haracter|
|00003e90| 73 20 75 70 20 74 6f 20 | 74 68 65 20 20 6e 65 78 |s up to |the nex|
|00003ea0| 74 20 20 7c 0d 20 20 20 | 20 20 63 75 72 6c 79 20 |t |. | curly |
|00003eb0| 20 62 72 61 63 65 2e 20 | 20 20 41 72 72 61 79 20 | brace. | Array |
|00003ec0| 20 72 65 66 65 72 65 6e | 63 65 73 20 20 61 72 65 | referen|ces are|
|00003ed0| 20 20 6e 6f 74 20 70 6f | 73 73 69 62 6c 65 20 69 | not po|ssible i|
|00003ee0| 6e 20 74 68 69 73 20 20 | 7c 0d 20 20 20 20 20 66 |n this ||. f|
|00003ef0| 6f 72 6d 3a 20 20 74 68 | 65 20 6e 61 6d 65 20 62 |orm: th|e name b|
|00003f00| 65 74 77 65 65 6e 20 62 | 72 61 63 65 73 20 69 73 |etween b|races is|
|00003f10| 20 20 61 73 73 75 6d 65 | 64 20 20 74 6f 20 20 72 | assume|d to r|
|00003f20| 65 66 65 72 20 20 74 6f | 20 20 61 20 20 7c 0d 20 |efer to| a |. |
|00003f30| 20 20 20 20 73 63 61 6c | 61 72 20 76 61 72 69 61 | scal|ar varia|
|00003f40| 62 6c 65 2e 20 20 46 6f | 72 20 65 78 61 6d 70 6c |ble. Fo|r exampl|
|00003f50| 65 2c 20 69 66 20 76 61 | 72 69 61 62 6c 65 20 66 |e, if va|riable f|
|00003f60| 6f 6f 20 68 61 73 20 74 | 68 65 20 76 61 6c 75 65 |oo has t|he value|
|00003f70| 20 20 7c 0d 20 20 20 20 | 20 74 65 73 74 2c 20 74 | |. | test, t|
|00003f80| 68 65 6e 20 74 68 65 20 | 63 6f 6d 6d 61 6e 64 20 |hen the |command |
|00003f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003fb0| 20 20 20 20 20 20 20 7c | 0d 0d 20 20 20 20 20 20 | ||.. |
|00003fc0| 20 20 20 20 73 65 74 20 | 61 20 61 62 63 24 7b 66 | set |a abc${f|
|00003fd0| 6f 6f 7d 62 61 72 20 20 | 20 20 20 20 20 20 20 20 |oo}bar | |
|00003fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003ff0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7c 0d 20 | | |. |
|00004000| 20 20 20 20 69 73 20 65 | 71 75 69 76 61 6c 65 6e | is e|quivalen|
|00004010| 74 20 74 6f 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |t to the| command|
|00004020| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004040| 20 20 7c 0d 0d 20 20 20 | 20 20 20 20 20 20 20 73 | |.. | s|
|00004050| 65 74 20 61 20 61 62 63 | 74 65 73 74 62 61 72 20 |et a abc|testbar |
|00004060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004080| 20 20 20 20 20 20 20 20 | 7c 0d 20 20 20 20 20 56 | ||. V|
|00004090| 61 72 69 61 62 6c 65 20 | 73 75 62 73 74 69 74 75 |ariable |substitu|
|000040a0| 74 69 6f 6e 20 64 6f 65 | 73 20 6e 6f 74 20 6f 63 |tion doe|s not oc|
|000040b0| 63 75 72 20 69 6e 20 61 | 72 67 75 6d 65 6e 74 73 |cur in a|rguments|
|000040c0| 20 20 74 68 61 74 20 20 | 61 72 65 0d 20 20 20 20 | that |are. |
|000040d0| 20 65 6e 63 6c 6f 73 65 | 64 20 20 69 6e 20 20 62 | enclose|d in b|
|000040e0| 72 61 63 65 73 3a 20 20 | 74 68 65 20 64 6f 6c 6c |races: |the doll|
|000040f0| 61 72 20 73 69 67 6e 20 | 61 6e 64 20 76 61 72 69 |ar sign |and vari|
|00004100| 61 62 6c 65 20 6e 61 6d | 65 20 61 72 65 0d 0d 0d |able nam|e are...|
|00004110| 0d 53 75 6e 20 52 65 6c | 65 61 73 65 20 34 2e 31 |.Sun Rel|ease 4.1|
|00004120| 20 20 20 20 20 20 20 20 | 20 20 20 4c 61 73 74 20 | | Last |
|00004130| 63 68 61 6e 67 65 3a 20 | 20 20 20 20 20 20 20 20 |change: | |
|00004140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004150| 20 36 0d 0d 0d 0d 0d 0d | 0d 54 63 6c 28 33 29 20 | 6......|.Tcl(3) |
|00004160| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004170| 43 20 4c 49 42 52 41 52 | 59 20 46 55 4e 43 54 49 |C LIBRAR|Y FUNCTI|
|00004180| 4f 4e 53 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ONS | |
|00004190| 20 20 20 20 54 63 6c 28 | 33 29 0d 0d 0d 0d 20 20 | Tcl(|3).... |
|000041a0| 20 20 20 70 61 73 73 65 | 64 20 74 68 72 6f 75 67 | passe|d throug|
|000041b0| 68 20 74 6f 20 74 68 65 | 20 61 72 67 75 6d 65 6e |h to the| argumen|
|000041c0| 74 20 76 65 72 62 61 74 | 69 6d 2e 0d 0d 20 20 20 |t verbat|im... |
|000041d0| 20 20 54 68 65 20 64 6f | 6c 6c 61 72 20 73 69 67 | The do|llar sig|
|000041e0| 6e 20 61 62 62 72 65 76 | 69 61 74 69 6f 6e 20 69 |n abbrev|iation i|
|000041f0| 73 20 73 69 6d 70 6c 79 | 20 61 20 73 68 6f 72 74 |s simply| a short|
|00004200| 68 61 6e 64 20 66 6f 72 | 6d 2e 20 20 24 61 0d 20 |hand for|m. $a. |
|00004210| 20 20 20 20 69 73 20 20 | 63 6f 6d 70 6c 65 74 65 | is |complete|
|00004220| 6c 79 20 20 65 71 75 69 | 76 61 6c 65 6e 74 20 20 |ly equi|valent |
|00004230| 74 6f 20 20 5b 73 65 74 | 20 61 5d 3b 20 69 74 20 |to [set| a]; it |
|00004240| 69 73 20 70 72 6f 76 69 | 64 65 64 20 61 73 20 61 |is provi|ded as a|
|00004250| 0d 20 20 20 20 20 63 6f | 6e 76 65 6e 69 65 6e 63 |. co|nvenienc|
|00004260| 65 20 74 6f 20 72 65 64 | 75 63 65 20 74 79 70 69 |e to red|uce typi|
|00004270| 6e 67 2e 0d 0d 0d 53 45 | 50 41 52 41 54 49 4e 47 |ng....SE|PARATING|
|00004280| 20 43 4f 4d 4d 41 4e 44 | 53 20 57 49 54 48 20 53 | COMMAND|S WITH S|
|00004290| 45 4d 49 2d 43 4f 4c 4f | 4e 53 0d 20 20 20 20 20 |EMI-COLO|NS. |
|000042a0| 4e 6f 72 6d 61 6c 6c 79 | 2c 20 65 61 63 68 20 63 |Normally|, each c|
|000042b0| 6f 6d 6d 61 6e 64 20 6f | 63 63 75 70 69 65 73 20 |ommand o|ccupies |
|000042c0| 6f 6e 65 20 20 6c 69 6e | 65 20 20 28 74 68 65 20 |one lin|e (the |
|000042d0| 20 63 6f 6d 6d 61 6e 64 | 20 20 69 73 0d 20 20 20 | command| is. |
|000042e0| 20 20 74 65 72 6d 69 6e | 61 74 65 64 20 20 62 79 | termin|ated by|
|000042f0| 20 20 61 20 20 6e 65 77 | 6c 69 6e 65 20 20 63 68 | a new|line ch|
|00004300| 61 72 61 63 74 65 72 29 | 2e 20 20 48 6f 77 65 76 |aracter)|. Howev|
|00004310| 65 72 2c 20 73 65 6d 69 | 2d 63 6f 6c 6f 6e 0d 20 |er, semi|-colon. |
|00004320| 20 20 20 20 28 60 60 3b | 27 27 29 20 69 73 20 74 | (``;|'') is t|
|00004330| 72 65 61 74 65 64 20 61 | 73 20 61 20 63 6f 6d 6d |reated a|s a comm|
|00004340| 61 6e 64 20 73 65 70 61 | 72 61 74 6f 72 20 63 68 |and sepa|rator ch|
|00004350| 61 72 61 63 74 65 72 3b | 20 20 6d 75 6c 74 69 2d |aracter;| multi-|
|00004360| 0d 20 20 20 20 20 70 6c | 65 20 20 63 6f 6d 6d 61 |. pl|e comma|
|00004370| 6e 64 73 20 20 6d 61 79 | 20 20 62 65 20 70 6c 61 |nds may| be pla|
|00004380| 63 65 64 20 6f 6e 20 6f | 6e 65 20 6c 69 6e 65 20 |ced on o|ne line |
|00004390| 62 79 20 73 65 70 61 72 | 61 74 69 6e 67 20 74 68 |by separ|ating th|
|000043a0| 65 6d 0d 20 20 20 20 20 | 77 69 74 68 20 61 20 73 |em. |with a s|
|000043b0| 65 6d 69 2d 63 6f 6c 6f | 6e 2e 20 20 53 65 6d 69 |emi-colo|n. Semi|
|000043c0| 2d 63 6f 6c 6f 6e 73 20 | 61 72 65 20 6e 6f 74 20 |-colons |are not |
|000043d0| 74 72 65 61 74 65 64 20 | 20 61 73 20 20 63 6f 6d |treated | as com|
|000043e0| 6d 61 6e 64 0d 20 20 20 | 20 20 73 65 70 61 72 61 |mand. | separa|
|000043f0| 74 6f 72 73 20 20 69 66 | 20 20 74 68 65 79 20 20 |tors if| they |
|00004400| 61 70 70 65 61 72 20 20 | 77 69 74 68 69 6e 20 63 |appear |within c|
|00004410| 75 72 6c 79 20 62 72 61 | 63 65 73 20 6f 72 20 64 |urly bra|ces or d|
|00004420| 6f 75 62 6c 65 2d 0d 20 | 20 20 20 20 71 75 6f 74 |ouble-. | quot|
|00004430| 65 73 2e 0d 0d 0d 42 41 | 43 4b 53 4c 41 53 48 20 |es....BA|CKSLASH |
|00004440| 53 55 42 53 54 49 54 55 | 54 49 4f 4e 0d 20 20 20 |SUBSTITU|TION. |
|00004450| 20 20 42 61 63 6b 73 6c | 61 73 68 65 73 20 6d 61 | Backsl|ashes ma|
|00004460| 79 20 62 65 20 75 73 65 | 64 20 74 6f 20 20 69 6e |y be use|d to in|
|00004470| 73 65 72 74 20 20 6e 6f | 6e 2d 70 72 69 6e 74 69 |sert no|n-printi|
|00004480| 6e 67 20 20 63 68 61 72 | 61 63 74 65 72 73 0d 20 |ng char|acters. |
|00004490| 20 20 20 20 69 6e 74 6f | 20 20 63 6f 6d 6d 61 6e | into| comman|
|000044a0| 64 20 20 66 69 65 6c 64 | 73 20 20 61 6e 64 20 61 |d field|s and a|
|000044b0| 6c 73 6f 20 74 6f 20 69 | 6e 73 65 72 74 20 73 70 |lso to i|nsert sp|
|000044c0| 65 63 69 61 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ecial ch|aracters|
|000044d0| 0d 20 20 20 20 20 6c 69 | 6b 65 20 62 72 61 63 65 |. li|ke brace|
|000044e0| 73 20 61 6e 64 20 62 72 | 61 63 6b 65 74 73 20 20 |s and br|ackets |
|000044f0| 69 6e 74 6f 20 20 66 69 | 65 6c 64 73 20 20 77 69 |into fi|elds wi|
|00004500| 74 68 6f 75 74 20 20 74 | 68 65 6d 20 20 62 65 69 |thout t|hem bei|
|00004510| 6e 67 0d 20 20 20 20 20 | 69 6e 74 65 72 70 72 65 |ng. |interpre|
|00004520| 74 65 64 20 20 73 70 65 | 63 69 61 6c 6c 79 20 20 |ted spe|cially |
|00004530| 61 73 20 20 64 65 73 63 | 72 69 62 65 64 20 20 61 |as desc|ribed a|
|00004540| 62 6f 76 65 2e 20 20 54 | 68 65 20 62 61 63 6b 73 |bove. T|he backs|
|00004550| 6c 61 73 68 0d 20 20 20 | 20 20 73 65 71 75 65 6e |lash. | sequen|
|00004560| 63 65 73 20 75 6e 64 65 | 72 73 74 6f 6f 64 20 20 |ces unde|rstood |
|00004570| 62 79 20 20 74 68 65 20 | 20 54 63 6c 20 20 69 6e |by the | Tcl in|
|00004580| 74 65 72 70 72 65 74 65 | 72 20 20 61 72 65 20 20 |terprete|r are |
|00004590| 6c 69 73 74 65 64 0d 20 | 20 20 20 20 62 65 6c 6f |listed. | belo|
|000045a0| 77 2e 20 20 20 49 6e 20 | 65 61 63 68 20 63 61 73 |w. In |each cas|
|000045b0| 65 2c 20 74 68 65 20 62 | 61 63 6b 73 6c 61 73 68 |e, the b|ackslash|
|000045c0| 20 73 65 71 75 65 6e 63 | 65 20 69 73 20 72 65 70 | sequenc|e is rep|
|000045d0| 6c 61 63 65 64 20 62 79 | 0d 20 20 20 20 20 74 68 |laced by|. th|
|000045e0| 65 20 67 69 76 65 6e 20 | 63 68 61 72 61 63 74 65 |e given |characte|
|000045f0| 72 3a 0d 0d 20 20 20 20 | 20 5c 62 20 20 20 20 20 |r:.. | \b |
|00004600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 42 61 63 | | Bac|
|00004610| 6b 73 70 61 63 65 20 28 | 30 78 38 29 2e 0d 0d 20 |kspace (|0x8)... |
|00004620| 20 20 20 20 5c 66 20 20 | 20 20 20 20 20 20 20 20 | \f | |
|00004630| 20 20 20 20 20 20 20 20 | 46 6f 72 6d 20 66 65 65 | |Form fee|
|00004640| 64 20 28 30 78 63 29 2e | 0d 0d 20 20 20 20 20 5c |d (0xc).|.. \|
|00004650| 6e 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n | |
|00004660| 20 20 20 4e 65 77 6c 69 | 6e 65 20 28 30 78 61 29 | Newli|ne (0xa)|
|00004670| 2e 0d 0d 20 20 20 20 20 | 5c 72 20 20 20 20 20 20 |... |\r |
|00004680| 20 20 20 20 20 20 20 20 | 20 20 20 20 43 61 72 72 | | Carr|
|00004690| 69 61 67 65 2d 72 65 74 | 75 72 6e 20 28 30 78 64 |iage-ret|urn (0xd|
|000046a0| 29 2e 0d 0d 20 20 20 20 | 20 5c 74 20 20 20 20 20 |)... | \t |
|000046b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 54 61 62 | | Tab|
|000046c0| 20 28 30 78 39 29 2e 0d | 0d 20 20 20 20 20 5c 76 | (0x9)..|. \v|
|000046d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000046e0| 20 20 56 65 72 74 69 63 | 61 6c 20 74 61 62 20 28 | Vertic|al tab (|
|000046f0| 30 78 62 29 2e 0d 0d 20 | 20 20 20 20 5c 7b 20 20 |0xb)... | \{ |
|00004700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004710| 4c 65 66 74 20 62 72 61 | 63 65 20 28 60 60 7b 27 |Left bra|ce (``{'|
|00004720| 27 29 2e 0d 0d 20 20 20 | 20 20 5c 7d 20 20 20 20 |')... | \} |
|00004730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 52 69 | | Ri|
|00004740| 67 68 74 20 62 72 61 63 | 65 20 28 60 60 7d 27 27 |ght brac|e (``}''|
|00004750| 29 2e 0d 0d 20 20 20 20 | 20 5c 5b 20 20 20 20 20 |)... | \[ |
|00004760| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 4f 70 65 | | Ope|
|00004770| 6e 20 62 72 61 63 6b 65 | 74 20 28 60 60 5b 27 27 |n bracke|t (``[''|
|00004780| 29 2e 0d 0d 20 20 20 20 | 20 5c 5d 20 20 20 20 20 |)... | \] |
|00004790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 43 6c 6f | | Clo|
|000047a0| 73 65 20 62 72 61 63 6b | 65 74 20 28 60 60 5d 27 |se brack|et (``]'|
|000047b0| 27 29 2e 0d 0d 20 20 20 | 20 20 5c 24 20 20 20 20 |')... | \$ |
|000047c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 44 6f | | Do|
|000047d0| 6c 6c 61 72 20 73 69 67 | 6e 20 28 60 60 24 27 27 |llar sig|n (``$''|
|000047e0| 29 2e 0d 0d 20 20 20 20 | 20 5c 3c 73 70 61 63 65 |)... | \<space|
|000047f0| 3e 20 20 20 20 20 20 20 | 20 20 20 20 20 53 70 61 |> | Spa|
|00004800| 63 65 20 28 60 60 20 27 | 27 29 3a 20 64 6f 65 73 |ce (`` '|'): does|
|00004810| 6e 27 74 20 20 74 65 72 | 6d 69 6e 61 74 65 20 20 |n't ter|minate |
|00004820| 61 72 67 75 2d 0d 20 20 | 20 20 20 20 20 20 20 20 |argu-. | |
|00004830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00004840| 65 6e 74 2e 0d 0d 20 20 | 20 20 20 5c 3b 20 20 20 |ent... | \; |
|00004850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 53 | | S|
|00004860| 65 6d 69 2d 63 6f 6c 6f | 6e 3a 20 64 6f 65 73 6e |emi-colo|n: doesn|
|00004870| 27 74 20 74 65 72 6d 69 | 6e 61 74 65 20 63 6f 6d |'t termi|nate com|
|00004880| 6d 61 6e 64 2e 0d 0d 0d | 0d 53 75 6e 20 52 65 6c |mand....|.Sun Rel|
|00004890| 65 61 73 65 20 34 2e 31 | 20 20 20 20 20 20 20 20 |ease 4.1| |
|000048a0| 20 20 20 4c 61 73 74 20 | 63 68 61 6e 67 65 3a 20 | Last |change: |
|000048b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 37 0d 0d 0d 0d 0d 0d | | 7......|
|000048d0| 0d 54 63 6c 28 33 29 20 | 20 20 20 20 20 20 20 20 |.Tcl(3) | |
|000048e0| 20 20 20 20 20 20 20 20 | 43 20 4c 49 42 52 41 52 | |C LIBRAR|
|000048f0| 59 20 46 55 4e 43 54 49 | 4f 4e 53 20 20 20 20 20 |Y FUNCTI|ONS |
|00004900| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 63 6c 28 | | Tcl(|
|00004910| 33 29 0d 0d 0d 0d 20 20 | 20 20 20 5c 22 20 20 20 |3).... | \" |
|00004920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 44 | | D|
|00004930| 6f 75 62 6c 65 2d 71 75 | 6f 74 65 2e 0d 0d 20 20 |ouble-qu|ote... |
|00004940| 20 20 20 5c 3c 6e 65 77 | 6c 69 6e 65 3e 20 20 20 | \<new|line> |
|00004950| 20 20 20 20 20 20 20 4e | 6f 74 68 69 6e 67 3a 20 | N|othing: |
|00004960| 20 74 68 69 73 20 6a 6f | 69 6e 73 20 74 77 6f 20 | this jo|ins two |
|00004970| 6c 69 6e 65 73 20 20 74 | 6f 67 65 74 68 65 72 0d |lines t|ogether.|
|00004980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004990| 20 20 20 20 20 20 20 20 | 20 69 6e 74 6f 20 20 61 | | into a|
|000049a0| 20 20 73 69 6e 67 6c 65 | 20 20 6c 69 6e 65 2e 20 | single| line. |
|000049b0| 20 20 54 68 69 73 20 20 | 62 61 63 6b 73 6c 61 73 | This |backslas|
|000049c0| 68 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h. | |
|000049d0| 20 20 20 20 20 20 20 20 | 20 20 20 66 65 61 74 75 | | featu|
|000049e0| 72 65 20 69 73 20 75 6e | 69 71 75 65 20 69 6e 20 |re is un|ique in |
|000049f0| 20 74 68 61 74 20 20 69 | 74 20 20 77 69 6c 6c 20 | that i|t will |
|00004a00| 20 62 65 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | be. | |
|00004a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 61 70 70 | | app|
|00004a20| 6c 69 65 64 20 20 65 76 | 65 6e 20 20 77 68 65 6e |lied ev|en when|
|00004a30| 20 20 74 68 65 20 73 65 | 71 75 65 6e 63 65 20 6f | the se|quence o|
|00004a40| 63 63 75 72 73 0d 20 20 | 20 20 20 20 20 20 20 20 |ccurs. | |
|00004a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|00004a60| 69 74 68 69 6e 20 62 72 | 61 63 65 73 2e 0d 0d 20 |ithin br|aces... |
|00004a70| 20 20 20 20 5c 5c 20 20 | 20 20 20 20 20 20 20 20 | \\ | |
|00004a80| 20 20 20 20 20 20 20 20 | 42 61 63 6b 73 6c 61 73 | |Backslas|
|00004a90| 68 20 28 60 60 5c 27 27 | 29 2e 0d 0d 20 20 20 20 |h (``\''|)... |
|00004aa0| 20 5c 64 64 64 20 20 20 | 20 20 20 20 20 20 20 20 | \ddd | |
|00004ab0| 20 20 20 20 20 54 68 65 | 20 64 69 67 69 74 73 20 | The| digits |
|00004ac0| 64 64 64 20 28 6f 6e 65 | 2c 20 74 77 6f 2c 20 20 |ddd (one|, two, |
|00004ad0| 6f 72 20 20 74 68 72 65 | 65 20 20 6f 66 0d 20 20 |or thre|e of. |
|00004ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004af0| 20 20 20 20 20 20 20 74 | 68 65 6d 29 20 20 67 69 | t|hem) gi|
|00004b00| 76 65 20 74 68 65 20 6f | 63 74 61 6c 20 76 61 6c |ve the o|ctal val|
|00004b10| 75 65 20 6f 66 20 74 68 | 65 20 63 68 61 72 2d 0d |ue of th|e char-.|
|00004b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b30| 20 20 20 20 20 20 20 20 | 20 61 63 74 65 72 2e 20 | | acter. |
|00004b40| 20 20 4e 75 6c 6c 20 20 | 63 68 61 72 61 63 74 65 | Null |characte|
|00004b50| 72 73 20 20 6d 61 79 20 | 20 6e 6f 74 20 20 20 62 |rs may | not b|
|00004b60| 65 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e. | |
|00004b70| 20 20 20 20 20 20 20 20 | 20 20 20 65 6d 62 65 64 | | embed|
|00004b80| 64 65 64 20 20 69 6e 20 | 20 63 6f 6d 6d 61 6e 64 |ded in | command|
|00004b90| 20 20 66 69 65 6c 64 73 | 3b 20 69 66 20 64 64 64 | fields|; if ddd|
|00004ba0| 20 69 73 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | is. | |
|00004bb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7a 65 72 | | zer|
|00004bc0| 6f 20 20 74 68 65 6e 20 | 20 74 68 65 20 20 62 61 |o then | the ba|
|00004bd0| 63 6b 73 6c 61 73 68 20 | 20 73 65 71 75 65 6e 63 |ckslash | sequenc|
|00004be0| 65 20 20 69 73 0d 20 20 | 20 20 20 20 20 20 20 20 |e is. | |
|00004bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00004c00| 67 6e 6f 72 65 64 20 20 | 20 28 69 2e 65 2e 20 20 |gnored | (i.e. |
|00004c10| 69 74 20 20 6d 61 70 73 | 20 20 74 6f 20 20 61 6e |it maps| to an|
|00004c20| 20 20 65 6d 70 74 79 0d | 20 20 20 20 20 20 20 20 | empty.| |
|00004c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c40| 20 73 74 72 69 6e 67 29 | 2e 0d 0d 20 20 20 20 20 | string)|... |
|00004c50| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 69 6e 20 |For exam|ple, in |
|00004c60| 74 68 65 20 63 6f 6d 6d | 61 6e 64 0d 0d 20 20 20 |the comm|and.. |
|00004c70| 20 20 20 20 20 20 20 73 | 65 74 20 61 20 5c 7b 78 | s|et a \{x|
|00004c80| 5c 5b 5c 20 79 7a 5c 31 | 34 31 0d 20 20 20 20 20 |\[\ yz\1|41. |
|00004c90| 74 68 65 20 73 65 63 6f | 6e 64 20 61 72 67 75 6d |the seco|nd argum|
|00004ca0| 65 6e 74 20 74 6f 20 73 | 65 74 20 77 69 6c 6c 20 |ent to s|et will |
|00004cb0| 62 65 20 60 60 7b 78 5b | 20 79 7a 61 27 27 2e 0d |be ``{x[| yza''..|
|00004cc0| 0d 20 20 20 20 20 49 66 | 20 61 20 62 61 63 6b 73 |. If| a backs|
|00004cd0| 6c 61 73 68 20 69 73 20 | 66 6f 6c 6c 6f 77 65 64 |lash is |followed|
|00004ce0| 20 62 79 20 73 6f 6d 65 | 74 68 69 6e 67 20 6f 74 | by some|thing ot|
|00004cf0| 68 65 72 20 20 74 68 61 | 6e 20 20 6f 6e 65 20 20 |her tha|n one |
|00004d00| 6f 66 0d 20 20 20 20 20 | 74 68 65 20 6f 70 74 69 |of. |the opti|
|00004d10| 6f 6e 73 20 64 65 73 63 | 72 69 62 65 64 20 61 62 |ons desc|ribed ab|
|00004d20| 6f 76 65 2c 20 74 68 65 | 6e 20 74 68 65 20 62 61 |ove, the|n the ba|
|00004d30| 63 6b 73 6c 61 73 68 20 | 69 73 20 74 72 61 6e 73 |ckslash |is trans|
|00004d40| 6d 69 74 2d 0d 20 20 20 | 20 20 74 65 64 20 74 6f |mit-. | ted to|
|00004d50| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 20 66 69 | the arg|ument fi|
|00004d60| 65 6c 64 20 77 69 74 68 | 6f 75 74 20 20 61 6e 79 |eld with|out any|
|00004d70| 20 20 73 70 65 63 69 61 | 6c 20 20 70 72 6f 63 65 | specia|l proce|
|00004d80| 73 73 69 6e 67 2c 0d 20 | 20 20 20 20 61 6e 64 20 |ssing,. | and |
|00004d90| 20 74 68 65 20 20 54 63 | 6c 20 20 73 63 61 6e 6e | the Tc|l scann|
|00004da0| 65 72 20 20 63 6f 6e 74 | 69 6e 75 65 73 20 6e 6f |er cont|inues no|
|00004db0| 72 6d 61 6c 20 70 72 6f | 63 65 73 73 69 6e 67 20 |rmal pro|cessing |
|00004dc0| 77 69 74 68 20 74 68 65 | 0d 20 20 20 20 20 6e 65 |with the|. ne|
|00004dd0| 78 74 20 63 68 61 72 61 | 63 74 65 72 2e 20 20 46 |xt chara|cter. F|
|00004de0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 69 6e 20 74 |or examp|le, in t|
|00004df0| 68 65 20 63 6f 6d 6d 61 | 6e 64 0d 0d 20 20 20 20 |he comma|nd.. |
|00004e00| 20 20 20 20 20 20 73 65 | 74 20 5c 2a 61 20 5c 5c | se|t \*a \\|
|00004e10| 5c 7b 66 6f 6f 0d 20 20 | 20 20 20 54 68 65 20 66 |\{foo. | The f|
|00004e20| 69 72 73 74 20 61 72 67 | 75 6d 65 6e 74 20 74 6f |irst arg|ument to|
|00004e30| 20 73 65 74 20 77 69 6c | 6c 20 62 65 20 5c 2a 61 | set wil|l be \*a|
|00004e40| 20 61 6e 64 20 74 68 65 | 20 20 73 65 63 6f 6e 64 | and the| second|
|00004e50| 20 20 61 72 67 75 2d 0d | 20 20 20 20 20 6d 65 6e | argu-.| men|
|00004e60| 74 20 77 69 6c 6c 20 62 | 65 20 5c 7b 66 6f 6f 2e |t will b|e \{foo.|
|00004e70| 0d 0d 20 20 20 20 20 49 | 66 20 20 61 6e 20 20 61 |.. I|f an a|
|00004e80| 72 67 75 6d 65 6e 74 20 | 20 69 73 20 20 65 6e 63 |rgument | is enc|
|00004e90| 6c 6f 73 65 64 20 20 69 | 6e 20 20 62 72 61 63 65 |losed i|n brace|
|00004ea0| 73 2c 20 20 74 68 65 6e | 20 20 62 61 63 6b 73 6c |s, then| backsl|
|00004eb0| 61 73 68 0d 20 20 20 20 | 20 73 65 71 75 65 6e 63 |ash. | sequenc|
|00004ec0| 65 73 20 69 6e 73 69 64 | 65 20 74 68 65 20 61 72 |es insid|e the ar|
|00004ed0| 67 75 6d 65 6e 74 20 61 | 72 65 20 70 61 72 73 65 |gument a|re parse|
|00004ee0| 64 20 62 75 74 20 6e 6f | 20 73 75 62 73 74 69 74 |d but no| substit|
|00004ef0| 75 74 69 6f 6e 0d 20 20 | 20 20 20 6f 63 63 75 72 |ution. | occur|
|00004f00| 73 20 20 28 65 78 63 65 | 70 74 20 20 66 6f 72 20 |s (exce|pt for |
|00004f10| 20 62 61 63 6b 73 6c 61 | 73 68 2d 6e 65 77 6c 69 | backsla|sh-newli|
|00004f20| 6e 65 29 3a 20 20 20 20 | 74 68 65 20 20 20 62 61 |ne): |the ba|
|00004f30| 63 6b 73 6c 61 73 68 0d | 20 20 20 20 20 73 65 71 |ckslash.| seq|
|00004f40| 75 65 6e 63 65 20 20 69 | 73 20 20 70 61 73 73 65 |uence i|s passe|
|00004f50| 64 20 20 74 68 72 6f 75 | 67 68 20 74 6f 20 74 68 |d throu|gh to th|
|00004f60| 65 20 61 72 67 75 6d 65 | 6e 74 20 61 73 20 69 73 |e argume|nt as is|
|00004f70| 2c 20 77 69 74 68 6f 75 | 74 0d 20 20 20 20 20 6d |, withou|t. m|
|00004f80| 61 6b 69 6e 67 20 61 6e | 79 20 73 70 65 63 69 61 |aking an|y specia|
|00004f90| 6c 20 69 6e 74 65 72 70 | 72 65 74 61 74 69 6f 6e |l interp|retation|
|00004fa0| 20 6f 66 20 74 68 65 20 | 63 68 61 72 61 63 74 65 | of the |characte|
|00004fb0| 72 73 20 20 69 6e 20 20 | 74 68 65 0d 20 20 20 20 |rs in |the. |
|00004fc0| 20 62 61 63 6b 73 6c 61 | 73 68 20 20 73 65 71 75 | backsla|sh sequ|
|00004fd0| 65 6e 63 65 2e 20 20 20 | 49 6e 20 70 61 72 74 69 |ence. |In parti|
|00004fe0| 63 75 6c 61 72 2c 20 62 | 61 63 6b 73 6c 61 73 68 |cular, b|ackslash|
|00004ff0| 65 64 20 62 72 61 63 65 | 73 20 61 72 65 0d 20 20 |ed brace|s are. |
|00005000| 20 20 20 6e 6f 74 20 63 | 6f 75 6e 74 65 64 20 69 | not c|ounted i|
|00005010| 6e 20 6c 6f 63 61 74 69 | 6e 67 20 74 68 65 20 6d |n locati|ng the m|
|00005020| 61 74 63 68 69 6e 67 20 | 72 69 67 68 74 20 62 72 |atching |right br|
|00005030| 61 63 65 20 20 74 68 61 | 74 20 20 74 65 72 2d 0d |ace tha|t ter-.|
|00005040| 20 20 20 20 20 6d 69 6e | 61 74 65 73 20 74 68 65 | min|ates the|
|00005050| 20 61 72 67 75 6d 65 6e | 74 2e 20 20 46 6f 72 20 | argumen|t. For |
|00005060| 65 78 61 6d 70 6c 65 2c | 20 69 6e 20 74 68 65 20 |example,| in the |
|00005070| 63 6f 6d 6d 61 6e 64 0d | 0d 20 20 20 20 20 20 20 |command.|. |
|00005080| 20 20 20 73 65 74 20 61 | 20 7b 5c 7b 61 62 63 7d | set a| {\{abc}|
|00005090| 0d 20 20 20 20 20 74 68 | 65 20 73 65 63 6f 6e 64 |. th|e second|
|000050a0| 20 61 72 67 75 6d 65 6e | 74 20 74 6f 20 73 65 74 | argumen|t to set|
|000050b0| 20 77 69 6c 6c 20 62 65 | 20 5c 7b 61 62 63 2e 0d | will be| \{abc..|
|000050c0| 0d 20 20 20 20 20 54 68 | 69 73 20 62 61 63 6b 73 |. Th|is backs|
|000050d0| 6c 61 73 68 20 6d 65 63 | 68 61 6e 69 73 6d 20 69 |lash mec|hanism i|
|000050e0| 73 20 6e 6f 74 20 73 75 | 66 66 69 63 69 65 6e 74 |s not su|fficient|
|000050f0| 20 74 6f 20 67 65 6e 65 | 72 61 74 65 20 61 62 73 | to gene|rate abs|
|00005100| 6f 2d 0d 20 20 20 20 20 | 6c 75 74 65 6c 79 20 20 |o-. |lutely |
|00005110| 61 6e 79 20 61 72 67 75 | 6d 65 6e 74 20 73 74 72 |any argu|ment str|
|00005120| 75 63 74 75 72 65 3b 20 | 69 74 20 6f 6e 6c 79 20 |ucture; |it only |
|00005130| 63 6f 76 65 72 73 20 74 | 68 65 20 6d 6f 73 74 20 |covers t|he most |
|00005140| 63 6f 6d 2d 0d 20 20 20 | 20 20 6d 6f 6e 20 63 61 |com-. | mon ca|
|00005150| 73 65 73 2e 20 20 54 6f | 20 70 72 6f 64 75 63 65 |ses. To| produce|
|00005160| 20 70 61 72 74 69 63 75 | 6c 61 72 6c 79 20 63 6f | particu|larly co|
|00005170| 6d 70 6c 69 63 61 74 65 | 64 20 61 72 67 75 6d 65 |mplicate|d argume|
|00005180| 6e 74 73 20 69 74 0d 20 | 20 20 20 20 69 73 20 20 |nts it. | is |
|00005190| 70 72 6f 62 61 62 6c 79 | 20 20 65 61 73 69 65 73 |probably| easies|
|000051a0| 74 20 20 74 6f 20 20 75 | 73 65 20 74 68 65 20 66 |t to u|se the f|
|000051b0| 6f 72 6d 61 74 20 63 6f | 6d 6d 61 6e 64 20 61 6c |ormat co|mmand al|
|000051c0| 6f 6e 67 20 77 69 74 68 | 0d 20 20 20 20 20 63 6f |ong with|. co|
|000051d0| 6d 6d 61 6e 64 20 73 75 | 62 73 74 69 74 75 74 69 |mmand su|bstituti|
|000051e0| 6f 6e 2e 0d 0d 0d 0d 53 | 75 6e 20 52 65 6c 65 61 |on.....S|un Relea|
|000051f0| 73 65 20 34 2e 31 20 20 | 20 20 20 20 20 20 20 20 |se 4.1 | |
|00005200| 20 4c 61 73 74 20 63 68 | 61 6e 67 65 3a 20 20 20 | Last ch|ange: |
|00005210| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005220| 20 20 20 20 20 20 20 38 | 0d 0d 0d 0d 0d 0d 0d 54 | 8|.......T|
|00005230| 63 6c 28 33 29 20 20 20 | 20 20 20 20 20 20 20 20 |cl(3) | |
|00005240| 20 20 20 20 20 20 43 20 | 4c 49 42 52 41 52 59 20 | C |LIBRARY |
|00005250| 46 55 4e 43 54 49 4f 4e | 53 20 20 20 20 20 20 20 |FUNCTION|S |
|00005260| 20 20 20 20 20 20 20 20 | 20 20 54 63 6c 28 33 29 | | Tcl(3)|
|00005270| 0d 0d 0d 0d 43 4f 4d 4d | 41 4e 44 20 53 55 4d 4d |....COMM|AND SUMM|
|00005280| 41 52 59 0d 20 20 20 20 | 20 5b 31 5d 20 20 41 20 |ARY. | [1] A |
|00005290| 63 6f 6d 6d 61 6e 64 20 | 69 73 20 6a 75 73 74 20 |command |is just |
|000052a0| 61 20 73 74 72 69 6e 67 | 2e 0d 0d 20 20 20 20 20 |a string|... |
|000052b0| 5b 32 5d 20 20 57 69 74 | 68 69 6e 20 61 20 73 74 |[2] Wit|hin a st|
|000052c0| 72 69 6e 67 20 63 6f 6d | 6d 61 6e 64 73 20 61 72 |ring com|mands ar|
|000052d0| 65 20 73 65 70 61 72 61 | 74 65 64 20 62 79 20 20 |e separa|ted by |
|000052e0| 6e 65 77 6c 69 6e 65 73 | 20 20 6f 72 0d 20 20 20 |newlines| or. |
|000052f0| 20 20 20 20 20 20 20 73 | 65 6d 69 2d 63 6f 6c 6f | s|emi-colo|
|00005300| 6e 73 20 28 75 6e 6c 65 | 73 73 20 74 68 65 20 6e |ns (unle|ss the n|
|00005310| 65 77 6c 69 6e 65 20 6f | 72 20 73 65 6d 69 2d 63 |ewline o|r semi-c|
|00005320| 6f 6c 6f 6e 20 69 73 20 | 77 69 74 68 69 6e 0d 20 |olon is |within. |
|00005330| 20 20 20 20 20 20 20 20 | 20 62 72 61 63 65 73 20 | | braces |
|00005340| 6f 72 20 62 72 61 63 6b | 65 74 73 20 6f 72 20 69 |or brack|ets or i|
|00005350| 73 20 62 61 63 6b 73 6c | 61 73 68 65 64 29 2e 0d |s backsl|ashed)..|
|00005360| 0d 20 20 20 20 20 5b 33 | 5d 20 20 41 20 63 6f 6d |. [3|] A com|
|00005370| 6d 61 6e 64 20 63 6f 6e | 73 69 73 74 73 20 6f 66 |mand con|sists of|
|00005380| 20 66 69 65 6c 64 73 2e | 20 20 54 68 65 20 66 69 | fields.| The fi|
|00005390| 72 73 74 20 66 69 65 6c | 64 20 20 69 73 20 20 74 |rst fiel|d is t|
|000053a0| 68 65 0d 20 20 20 20 20 | 20 20 20 20 20 6e 61 6d |he. | nam|
|000053b0| 65 20 6f 66 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |e of the| command|
|000053c0| 2c 20 61 6e 64 20 6d 61 | 79 20 62 65 20 61 62 62 |, and ma|y be abb|
|000053d0| 72 65 76 69 61 74 65 64 | 2e 20 20 54 68 65 20 6f |reviated|. The o|
|000053e0| 74 68 65 72 0d 20 20 20 | 20 20 20 20 20 20 20 66 |ther. | f|
|000053f0| 69 65 6c 64 73 20 61 72 | 65 20 73 74 72 69 6e 67 |ields ar|e string|
|00005400| 73 20 74 68 61 74 20 61 | 72 65 20 70 61 73 73 65 |s that a|re passe|
|00005410| 64 20 74 6f 20 74 68 61 | 74 20 20 63 6f 6d 6d 61 |d to tha|t comma|
|00005420| 6e 64 20 20 61 73 0d 20 | 20 20 20 20 20 20 20 20 |nd as. | |
|00005430| 20 61 72 67 75 6d 65 6e | 74 73 2e 0d 0d 20 20 20 | argumen|ts... |
|00005440| 20 20 5b 34 5d 20 20 46 | 69 65 6c 64 73 20 61 72 | [4] F|ields ar|
|00005450| 65 20 6e 6f 72 6d 61 6c | 6c 79 20 73 65 70 61 72 |e normal|ly separ|
|00005460| 61 74 65 64 20 62 79 20 | 77 68 69 74 65 20 73 70 |ated by |white sp|
|00005470| 61 63 65 2e 0d 0d 20 20 | 20 20 20 5b 35 5d 20 20 |ace... | [5] |
|00005480| 44 6f 75 62 6c 65 2d 71 | 75 6f 74 65 73 20 61 6c |Double-q|uotes al|
|00005490| 6c 6f 77 20 20 77 68 69 | 74 65 20 20 73 70 61 63 |low whi|te spac|
|000054a0| 65 20 20 61 6e 64 20 20 | 73 65 6d 69 2d 63 6f 6c |e and |semi-col|
|000054b0| 6f 6e 73 20 20 74 6f 0d | 20 20 20 20 20 20 20 20 |ons to.| |
|000054c0| 20 20 61 70 70 65 61 72 | 20 77 69 74 68 69 6e 20 | appear| within |
|000054d0| 61 20 73 69 6e 67 6c 65 | 20 61 72 67 75 6d 65 6e |a single| argumen|
|000054e0| 74 2e 20 20 43 6f 6d 6d | 61 6e 64 20 73 75 62 73 |t. Comm|and subs|
|000054f0| 74 69 74 75 74 69 6f 6e | 2c 0d 20 20 20 20 20 20 |titution|,. |
|00005500| 20 20 20 20 76 61 72 69 | 61 62 6c 65 20 73 75 62 | vari|able sub|
|00005510| 73 74 69 74 75 74 69 6f | 6e 2c 20 61 6e 64 20 62 |stitutio|n, and b|
|00005520| 61 63 6b 73 6c 61 73 68 | 20 73 75 62 73 74 69 74 |ackslash| substit|
|00005530| 75 74 69 6f 6e 20 73 74 | 69 6c 6c 0d 20 20 20 20 |ution st|ill. |
|00005540| 20 20 20 20 20 20 6f 63 | 63 75 72 20 69 6e 73 69 | oc|cur insi|
|00005550| 64 65 20 71 75 6f 74 65 | 73 2e 0d 0d 20 20 20 20 |de quote|s... |
|00005560| 20 5b 36 5d 20 20 42 72 | 61 63 65 73 20 64 65 66 | [6] Br|aces def|
|00005570| 65 72 20 69 6e 74 65 72 | 70 72 65 74 61 74 69 6f |er inter|pretatio|
|00005580| 6e 20 6f 66 20 73 70 65 | 63 69 61 6c 20 63 68 61 |n of spe|cial cha|
|00005590| 72 61 63 74 65 72 73 2e | 20 20 20 49 66 0d 20 20 |racters.| If. |
|000055a0| 20 20 20 20 20 20 20 20 | 61 20 20 66 69 65 6c 64 | |a field|
|000055b0| 20 20 62 65 67 69 6e 73 | 20 77 69 74 68 20 61 20 | begins| with a |
|000055c0| 6c 65 66 74 20 62 72 61 | 63 65 2c 20 74 68 65 6e |left bra|ce, then|
|000055d0| 20 69 74 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 0d | it cons|ists of.|
|000055e0| 20 20 20 20 20 20 20 20 | 20 20 65 76 65 72 79 74 | | everyt|
|000055f0| 68 69 6e 67 20 62 65 74 | 77 65 65 6e 20 74 68 65 |hing bet|ween the|
|00005600| 20 20 6c 65 66 74 20 20 | 62 72 61 63 65 20 20 61 | left |brace a|
|00005610| 6e 64 20 20 74 68 65 20 | 20 6d 61 74 63 68 69 6e |nd the | matchin|
|00005620| 67 0d 20 20 20 20 20 20 | 20 20 20 20 72 69 67 68 |g. | righ|
|00005630| 74 20 20 62 72 61 63 65 | 2e 20 54 68 65 20 62 72 |t brace|. The br|
|00005640| 61 63 65 73 20 74 68 65 | 6d 73 65 6c 76 65 73 20 |aces the|mselves |
|00005650| 61 72 65 20 6e 6f 74 20 | 69 6e 63 6c 75 64 65 64 |are not |included|
|00005660| 20 69 6e 0d 20 20 20 20 | 20 20 20 20 20 20 74 68 | in. | th|
|00005670| 65 20 61 72 67 75 6d 65 | 6e 74 2e 20 20 4e 6f 20 |e argume|nt. No |
|00005680| 66 75 72 74 68 65 72 20 | 70 72 6f 63 65 73 73 69 |further |processi|
|00005690| 6e 67 20 20 69 73 20 20 | 64 6f 6e 65 20 20 6f 6e |ng is |done on|
|000056a0| 20 20 74 68 65 0d 20 20 | 20 20 20 20 20 20 20 20 | the. | |
|000056b0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 20 62 65 74 |informat|ion bet|
|000056c0| 77 65 65 6e 20 20 74 68 | 65 20 62 72 61 63 65 73 |ween th|e braces|
|000056d0| 20 65 78 63 65 70 74 20 | 74 68 61 74 20 62 61 63 | except |that bac|
|000056e0| 6b 73 6c 61 73 68 2d 0d | 20 20 20 20 20 20 20 20 |kslash-.| |
|000056f0| 20 20 6e 65 77 6c 69 6e | 65 20 73 65 71 75 65 6e | newlin|e sequen|
|00005700| 63 65 73 20 61 72 65 20 | 65 6c 69 6d 69 6e 61 74 |ces are |eliminat|
|00005710| 65 64 2e 0d 0d 20 20 20 | 20 20 5b 37 5d 20 20 49 |ed... | [7] I|
|00005720| 66 20 61 20 66 69 65 6c | 64 20 64 6f 65 73 6e 27 |f a fiel|d doesn'|
|00005730| 74 20 62 65 67 69 6e 20 | 77 69 74 68 20 61 20 62 |t begin |with a b|
|00005740| 72 61 63 65 20 20 74 68 | 65 6e 20 20 62 61 63 6b |race th|en back|
|00005750| 73 6c 61 73 68 2c 0d 20 | 20 20 20 20 20 20 20 20 |slash,. | |
|00005760| 20 76 61 72 69 61 62 6c | 65 2c 20 20 61 6e 64 20 | variabl|e, and |
|00005770| 20 63 6f 6d 6d 61 6e 64 | 20 20 73 75 62 73 74 69 | command| substi|
|00005780| 74 75 74 69 6f 6e 20 20 | 61 72 65 20 20 64 6f 6e |tution |are don|
|00005790| 65 20 6f 6e 20 74 68 65 | 0d 20 20 20 20 20 20 20 |e on the|. |
|000057a0| 20 20 20 66 69 65 6c 64 | 2e 20 20 4f 6e 6c 79 20 | field|. Only |
|000057b0| 61 20 73 69 6e 67 6c 65 | 20 6c 65 76 65 6c 20 6f |a single| level o|
|000057c0| 66 20 70 72 6f 63 65 73 | 73 69 6e 67 20 69 73 20 |f proces|sing is |
|000057d0| 64 6f 6e 65 3a 20 20 74 | 68 65 0d 20 20 20 20 20 |done: t|he. |
|000057e0| 20 20 20 20 20 72 65 73 | 75 6c 74 73 20 20 6f 66 | res|ults of|
|000057f0| 20 20 6f 6e 65 20 73 75 | 62 73 74 69 74 75 74 69 | one su|bstituti|
|00005800| 6f 6e 20 61 72 65 20 6e | 6f 74 20 73 63 61 6e 6e |on are n|ot scann|
|00005810| 65 64 20 61 67 61 69 6e | 20 66 6f 72 0d 20 20 20 |ed again| for. |
|00005820| 20 20 20 20 20 20 20 66 | 75 72 74 68 65 72 20 73 | f|urther s|
|00005830| 75 62 73 74 69 74 75 74 | 69 6f 6e 73 20 6f 72 20 |ubstitut|ions or |
|00005840| 61 6e 79 20 6f 74 68 65 | 72 20 20 73 70 65 63 69 |any othe|r speci|
|00005850| 61 6c 20 20 74 72 65 61 | 74 6d 65 6e 74 2e 0d 20 |al trea|tment.. |
|00005860| 20 20 20 20 20 20 20 20 | 20 53 75 62 73 74 69 74 | | Substit|
|00005870| 75 74 69 6f 6e 20 20 63 | 61 6e 20 20 6f 63 63 75 |ution c|an occu|
|00005880| 72 20 20 6f 6e 20 20 61 | 6e 79 20 20 66 69 65 6c |r on a|ny fiel|
|00005890| 64 20 20 6f 66 20 61 20 | 63 6f 6d 6d 61 6e 64 2c |d of a |command,|
|000058a0| 0d 20 20 20 20 20 20 20 | 20 20 20 69 6e 63 6c 75 |. | inclu|
|000058b0| 64 69 6e 67 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |ding the| command|
|000058c0| 20 6e 61 6d 65 20 61 73 | 20 77 65 6c 6c 20 61 73 | name as| well as|
|000058d0| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 73 2e 0d | the arg|uments..|
|000058e0| 0d 20 20 20 20 20 5b 38 | 5d 20 20 49 66 20 74 68 |. [8|] If th|
|000058f0| 65 20 66 69 72 73 74 20 | 6e 6f 6e 2d 62 6c 61 6e |e first |non-blan|
|00005900| 6b 20 63 68 61 72 61 63 | 74 65 72 20 6f 66 20 61 |k charac|ter of a|
|00005910| 20 63 6f 6d 6d 61 6e 64 | 20 69 73 20 20 61 20 20 | command| is a |
|00005920| 23 2c 0d 20 20 20 20 20 | 20 20 20 20 20 65 76 65 |#,. | eve|
|00005930| 72 79 74 68 69 6e 67 20 | 20 66 72 6f 6d 20 20 74 |rything | from t|
|00005940| 68 65 20 20 23 20 75 70 | 20 74 68 72 6f 75 67 68 |he # up| through|
|00005950| 20 74 68 65 20 6e 65 78 | 74 20 6e 65 77 6c 69 6e | the nex|t newlin|
|00005960| 65 20 69 73 0d 20 20 20 | 20 20 20 20 20 20 20 74 |e is. | t|
|00005970| 72 65 61 74 65 64 20 61 | 73 20 61 20 63 6f 6d 6d |reated a|s a comm|
|00005980| 65 6e 74 20 61 6e 64 20 | 69 67 6e 6f 72 65 64 2e |ent and |ignored.|
|00005990| 0d 0d 0d 45 58 50 52 45 | 53 53 49 4f 4e 53 0d 20 |...EXPRE|SSIONS. |
|000059a0| 20 20 20 20 54 68 65 20 | 73 65 63 6f 6e 64 20 6d | The |second m|
|000059b0| 61 6a 6f 72 20 69 6e 74 | 65 72 70 72 65 74 61 74 |ajor int|erpretat|
|000059c0| 69 6f 6e 20 61 70 70 6c | 69 65 64 20 74 6f 20 73 |ion appl|ied to s|
|000059d0| 74 72 69 6e 67 73 20 69 | 6e 20 54 63 6c 20 69 73 |trings i|n Tcl is|
|000059e0| 20 20 7c 0d 20 20 20 20 | 20 61 73 20 20 65 78 70 | |. | as exp|
|000059f0| 72 65 73 73 69 6f 6e 73 | 2e 20 20 20 53 65 76 65 |ressions|. Seve|
|00005a00| 72 61 6c 20 20 63 6f 6d | 6d 61 6e 64 73 2c 20 73 |ral com|mands, s|
|00005a10| 75 63 68 20 61 73 20 65 | 78 70 72 2c 20 66 6f 72 |uch as e|xpr, for|
|00005a20| 2c 20 61 6e 64 20 20 7c | 0d 20 20 20 20 20 69 66 |, and ||. if|
|00005a30| 2c 20 74 72 65 61 74 20 | 6f 6e 65 20 6f 72 20 6d |, treat |one or m|
|00005a40| 6f 72 65 20 6f 66 20 74 | 68 65 69 72 20 61 72 67 |ore of t|heir arg|
|00005a50| 75 6d 65 6e 74 73 20 61 | 73 20 65 78 70 72 65 73 |uments a|s expres|
|00005a60| 73 69 6f 6e 73 20 20 61 | 6e 64 20 20 7c 0d 20 20 |sions a|nd |. |
|00005a70| 20 20 20 63 61 6c 6c 20 | 20 20 20 74 68 65 20 20 | call | the |
|00005a80| 20 54 63 6c 20 20 20 65 | 78 70 72 65 73 73 69 6f | Tcl e|xpressio|
|00005a90| 6e 20 20 20 70 72 6f 63 | 65 73 73 6f 72 73 20 20 |n proc|essors |
|00005aa0| 20 28 54 63 6c 5f 45 78 | 70 72 4c 6f 6e 67 2c 20 | (Tcl_Ex|prLong, |
|00005ab0| 20 7c 0d 20 20 20 20 20 | 54 63 6c 5f 45 78 70 72 | |. |Tcl_Expr|
|00005ac0| 42 6f 6f 6c 65 61 6e 2c | 20 65 74 63 2e 29 20 74 |Boolean,| etc.) t|
|00005ad0| 6f 20 65 76 61 6c 75 61 | 74 65 20 74 68 65 6d 2e |o evalua|te them.|
|00005ae0| 20 20 54 68 65 20 6f 70 | 65 72 61 74 6f 72 73 20 | The op|erators |
|00005af0| 70 65 72 2d 20 20 7c 0d | 20 20 20 20 20 6d 69 74 |per- |.| mit|
|00005b00| 74 65 64 20 69 6e 20 54 | 63 6c 20 65 78 70 72 65 |ted in T|cl expre|
|00005b10| 73 73 69 6f 6e 73 20 61 | 72 65 20 61 20 73 75 62 |ssions a|re a sub|
|00005b20| 73 65 74 20 6f 66 20 74 | 68 65 20 6f 70 65 72 61 |set of t|he opera|
|00005b30| 74 6f 72 73 20 70 65 72 | 2d 20 20 7c 0d 20 20 20 |tors per|- |. |
|00005b40| 20 20 6d 69 74 74 65 64 | 20 69 6e 20 43 20 65 78 | mitted| in C ex|
|00005b50| 70 72 65 73 73 69 6f 6e | 73 2c 20 61 6e 64 20 74 |pression|s, and t|
|00005b60| 68 65 79 20 68 61 76 65 | 20 74 68 65 20 73 61 6d |hey have| the sam|
|00005b70| 65 20 6d 65 61 6e 69 6e | 67 20 20 61 6e 64 20 20 |e meanin|g and |
|00005b80| 7c 0d 20 20 20 20 20 70 | 72 65 63 65 64 65 6e 63 ||. p|recedenc|
|00005b90| 65 20 20 61 73 20 20 74 | 68 65 20 20 63 6f 72 72 |e as t|he corr|
|00005ba0| 65 73 70 6f 6e 64 69 6e | 67 20 43 20 6f 70 65 72 |espondin|g C oper|
|00005bb0| 61 74 6f 72 73 2e 20 20 | 45 78 70 72 65 73 73 69 |ators. |Expressi|
|00005bc0| 6f 6e 73 20 20 7c 0d 20 | 20 20 20 20 61 6c 6d 6f |ons |. | almo|
|00005bd0| 73 74 20 61 6c 77 61 79 | 73 20 79 69 65 6c 64 20 |st alway|s yield |
|00005be0| 6e 75 6d 65 72 69 63 20 | 72 65 73 75 6c 74 73 20 |numeric |results |
|00005bf0| 20 28 69 6e 74 65 67 65 | 72 20 20 6f 72 20 20 66 | (intege|r or f|
|00005c00| 6c 6f 61 74 69 6e 67 2d | 20 20 7c 0d 20 20 20 20 |loating-| |. |
|00005c10| 20 70 6f 69 6e 74 20 76 | 61 6c 75 65 73 29 2e 20 | point v|alues). |
|00005c20| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 | For exa|mple, th|
|00005c30| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 20 20 20 |e expres|sion |
|00005c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7c | | ||
|00005c50| 0d 0d 0d 0d 0d 53 75 6e | 20 52 65 6c 65 61 73 65 |.....Sun| Release|
|00005c60| 20 34 2e 31 20 20 20 20 | 20 20 20 20 20 20 20 4c | 4.1 | L|
|00005c70| 61 73 74 20 63 68 61 6e | 67 65 3a 20 20 20 20 20 |ast chan|ge: |
|00005c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c90| 20 20 20 20 20 39 0d 0d | 0d 0d 0d 0d 0d 54 63 6c | 9..|.....Tcl|
|00005ca0| 28 33 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |(3) | |
|00005cb0| 20 20 20 20 43 20 4c 49 | 42 52 41 52 59 20 46 55 | C LI|BRARY FU|
|00005cc0| 4e 43 54 49 4f 4e 53 20 | 20 20 20 20 20 20 20 20 |NCTIONS | |
|00005cd0| 20 20 20 20 20 20 20 20 | 54 63 6c 28 33 29 0d 0d | |Tcl(3)..|
|00005ce0| 0d 0d 20 20 20 20 20 20 | 20 20 20 20 38 2e 32 20 |.. | 8.2 |
|00005cf0| 2b 20 36 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |+ 6 | |
|00005d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d20| 20 20 20 20 20 7c 0d 20 | 20 20 20 20 65 76 61 6c | |. | eval|
|00005d30| 75 61 74 65 73 20 74 6f | 20 31 34 2e 32 2e 20 20 |uates to| 14.2. |
|00005d40| 54 63 6c 20 65 78 70 72 | 65 73 73 69 6f 6e 73 20 |Tcl expr|essions |
|00005d50| 64 69 66 66 65 72 20 20 | 66 72 6f 6d 20 20 43 20 |differ |from C |
|00005d60| 20 65 78 70 72 65 73 2d | 20 20 7c 0d 20 20 20 20 | expres-| |. |
|00005d70| 20 73 69 6f 6e 73 20 20 | 69 6e 20 20 74 68 65 20 | sions |in the |
|00005d80| 20 77 61 79 20 74 68 61 | 74 20 6f 70 65 72 61 6e | way tha|t operan|
|00005d90| 64 73 20 61 72 65 20 73 | 70 65 63 69 66 69 65 64 |ds are s|pecified|
|00005da0| 2c 20 61 6e 64 20 69 6e | 20 74 68 61 74 20 20 7c |, and in| that ||
|00005db0| 0d 20 20 20 20 20 54 63 | 6c 20 65 78 70 72 65 73 |. Tc|l expres|
|00005dc0| 73 69 6f 6e 73 20 73 75 | 70 70 6f 72 74 20 6e 6f |sions su|pport no|
|00005dd0| 6e 2d 6e 75 6d 65 72 69 | 63 20 6f 70 65 72 61 6e |n-numeri|c operan|
|00005de0| 64 73 20 61 6e 64 20 73 | 74 72 69 6e 67 20 63 6f |ds and s|tring co|
|00005df0| 6d 2d 20 20 7c 0d 20 20 | 20 20 20 70 61 72 69 73 |m- |. | paris|
|00005e00| 6f 6e 73 2e 20 20 20 20 | 20 20 20 20 20 20 20 20 |ons. | |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e30| 20 20 20 20 20 20 20 20 | 20 7c 0d 0d 20 20 20 20 | | |.. |
|00005e40| 20 41 20 54 63 6c 20 65 | 78 70 72 65 73 73 69 6f | A Tcl e|xpressio|
|00005e50| 6e 20 63 6f 6e 73 69 73 | 74 73 20 20 6f 66 20 20 |n consis|ts of |
|00005e60| 61 20 20 63 6f 6d 62 69 | 6e 61 74 69 6f 6e 20 20 |a combi|nation |
|00005e70| 6f 66 20 20 6f 70 65 72 | 61 6e 64 73 2c 20 20 7c |of oper|ands, ||
|00005e80| 0d 20 20 20 20 20 6f 70 | 65 72 61 74 6f 72 73 2c |. op|erators,|
|00005e90| 20 61 6e 64 20 70 61 72 | 65 6e 74 68 65 73 65 73 | and par|entheses|
|00005ea0| 2e 20 20 57 68 69 74 65 | 20 73 70 61 63 65 20 6d |. White| space m|
|00005eb0| 61 79 20 62 65 20 75 73 | 65 64 20 62 65 74 77 65 |ay be us|ed betwe|
|00005ec0| 65 6e 20 20 7c 0d 20 20 | 20 20 20 74 68 65 20 6f |en |. | the o|
|00005ed0| 70 65 72 61 6e 64 73 20 | 61 6e 64 20 6f 70 65 72 |perands |and oper|
|00005ee0| 61 74 6f 72 73 20 61 6e | 64 20 70 61 72 65 6e 74 |ators an|d parent|
|00005ef0| 68 65 73 65 73 3b 20 69 | 74 20 69 73 20 69 67 6e |heses; i|t is ign|
|00005f00| 6f 72 65 64 20 62 79 20 | 20 7c 0d 20 20 20 20 20 |ored by | |. |
|00005f10| 74 68 65 20 20 65 78 70 | 72 65 73 73 69 6f 6e 20 |the exp|ression |
|00005f20| 20 70 72 6f 63 65 73 73 | 6f 72 2e 20 20 20 57 68 | process|or. Wh|
|00005f30| 65 72 65 20 20 70 6f 73 | 73 69 62 6c 65 2c 20 20 |ere pos|sible, |
|00005f40| 6f 70 65 72 61 6e 64 73 | 20 61 72 65 20 20 7c 0d |operands| are |.|
|00005f50| 20 20 20 20 20 69 6e 74 | 65 72 70 72 65 74 65 64 | int|erpreted|
|00005f60| 20 61 73 20 69 6e 74 65 | 67 65 72 20 76 61 6c 75 | as inte|ger valu|
|00005f70| 65 73 2e 20 20 49 6e 74 | 65 67 65 72 20 76 61 6c |es. Int|eger val|
|00005f80| 75 65 73 20 6d 61 79 20 | 62 65 20 73 70 65 63 69 |ues may |be speci|
|00005f90| 2d 20 20 7c 0d 20 20 20 | 20 20 66 69 65 64 20 20 |- |. | fied |
|00005fa0| 69 6e 20 20 64 65 63 69 | 6d 61 6c 20 20 28 74 68 |in deci|mal (th|
|00005fb0| 65 20 6e 6f 72 6d 61 6c | 20 63 61 73 65 29 2c 20 |e normal| case), |
|00005fc0| 69 6e 20 6f 63 74 61 6c | 20 28 69 66 20 74 68 65 |in octal| (if the|
|00005fd0| 20 66 69 72 73 74 20 20 | 7c 0d 20 20 20 20 20 63 | first ||. c|
|00005fe0| 68 61 72 61 63 74 65 72 | 20 6f 66 20 74 68 65 20 |haracter| of the |
|00005ff0| 6f 70 65 72 61 6e 64 20 | 69 73 20 30 29 2c 20 6f |operand |is 0), o|
|00006000| 72 20 69 6e 20 20 68 65 | 78 61 64 65 63 69 6d 61 |r in he|xadecima|
|00006010| 6c 20 20 28 69 66 20 20 | 74 68 65 20 20 7c 0d 20 |l (if |the |. |
|00006020| 20 20 20 20 66 69 72 73 | 74 20 20 74 77 6f 20 63 | firs|t two c|
|00006030| 68 61 72 61 63 74 65 72 | 73 20 6f 66 20 74 68 65 |haracter|s of the|
|00006040| 20 6f 70 65 72 61 6e 64 | 20 61 72 65 20 30 78 29 | operand| are 0x)|
|00006050| 2e 20 20 49 66 20 61 6e | 20 6f 70 65 72 61 6e 64 |. If an| operand|
|00006060| 20 20 7c 0d 20 20 20 20 | 20 64 6f 65 73 20 6e 6f | |. | does no|
|00006070| 74 20 68 61 76 65 20 6f | 6e 65 20 6f 66 20 74 68 |t have o|ne of th|
|00006080| 65 20 69 6e 74 65 67 65 | 72 20 66 6f 72 6d 61 74 |e intege|r format|
|00006090| 73 20 67 69 76 65 6e 20 | 20 61 62 6f 76 65 2c 20 |s given | above, |
|000060a0| 20 74 68 65 6e 20 20 7c | 0d 20 20 20 20 20 69 74 | then ||. it|
|000060b0| 20 20 69 73 20 20 74 72 | 65 61 74 65 64 20 61 73 | is tr|eated as|
|000060c0| 20 61 20 66 6c 6f 61 74 | 69 6e 67 2d 70 6f 69 6e | a float|ing-poin|
|000060d0| 74 20 6e 75 6d 62 65 72 | 20 69 66 20 74 68 61 74 |t number| if that|
|000060e0| 20 69 73 20 70 6f 73 73 | 69 2d 20 20 7c 0d 20 20 | is poss|i- |. |
|000060f0| 20 20 20 62 6c 65 2e 20 | 20 46 6c 6f 61 74 69 6e | ble. | Floatin|
|00006100| 67 2d 70 6f 69 6e 74 20 | 6e 75 6d 62 65 72 73 20 |g-point |numbers |
|00006110| 6d 61 79 20 62 65 20 73 | 70 65 63 69 66 69 65 64 |may be s|pecified|
|00006120| 20 69 6e 20 61 6e 79 20 | 6f 66 20 20 74 68 65 20 | in any |of the |
|00006130| 20 7c 0d 20 20 20 20 20 | 77 61 79 73 20 20 61 63 | |. |ways ac|
|00006140| 63 65 70 74 65 64 20 20 | 62 79 20 61 6e 20 41 4e |cepted |by an AN|
|00006150| 53 49 2d 63 6f 6d 70 6c | 69 61 6e 74 20 43 20 63 |SI-compl|iant C c|
|00006160| 6f 6d 70 69 6c 65 72 20 | 28 65 78 63 65 70 74 20 |ompiler |(except |
|00006170| 74 68 61 74 20 20 7c 0d | 20 20 20 20 20 74 68 65 |that |.| the|
|00006180| 20 60 60 66 27 27 2c 20 | 60 60 46 27 27 2c 20 60 | ``f'', |``F'', `|
|00006190| 60 6c 27 27 2c 20 61 6e | 64 20 60 60 4c 27 27 20 |`l'', an|d ``L'' |
|000061a0| 73 75 66 66 69 78 65 73 | 20 77 69 6c 6c 20 6e 6f |suffixes| will no|
|000061b0| 74 20 62 65 20 70 65 72 | 2d 20 20 7c 0d 20 20 20 |t be per|- |. |
|000061c0| 20 20 6d 69 74 74 65 64 | 20 69 6e 20 6d 6f 73 74 | mitted| in most|
|000061d0| 20 69 6e 73 74 61 6c 6c | 61 74 69 6f 6e 73 29 2e | install|ations).|
|000061e0| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 61 | For ex|ample, a|
|000061f0| 6c 6c 20 6f 66 20 74 68 | 65 20 66 6f 6c 2d 20 20 |ll of th|e fol- |
|00006200| 7c 0d 20 20 20 20 20 6c | 6f 77 69 6e 67 20 61 72 ||. l|owing ar|
|00006210| 65 20 76 61 6c 69 64 20 | 20 66 6c 6f 61 74 69 6e |e valid | floatin|
|00006220| 67 2d 70 6f 69 6e 74 20 | 20 6e 75 6d 62 65 72 73 |g-point | numbers|
|00006230| 3a 20 20 20 32 2e 31 2c | 20 20 33 2e 2c 20 20 36 |: 2.1,| 3., 6|
|00006240| 65 34 2c 20 20 7c 0d 20 | 20 20 20 20 37 2e 39 31 |e4, |. | 7.91|
|00006250| 65 2b 31 36 2e 20 20 49 | 66 20 6e 6f 20 6e 75 6d |e+16. I|f no num|
|00006260| 65 72 69 63 20 69 6e 74 | 65 72 70 72 65 74 61 74 |eric int|erpretat|
|00006270| 69 6f 6e 20 69 73 20 70 | 6f 73 73 69 62 6c 65 2c |ion is p|ossible,|
|00006280| 20 74 68 65 6e 20 61 6e | 20 20 7c 0d 20 20 20 20 | then an| |. |
|00006290| 20 6f 70 65 72 61 6e 64 | 20 69 73 20 6c 65 66 74 | operand| is left|
|000062a0| 20 61 73 20 61 20 73 74 | 72 69 6e 67 20 20 28 61 | as a st|ring (a|
|000062b0| 6e 64 20 20 6f 6e 6c 79 | 20 20 61 20 20 6c 69 6d |nd only| a lim|
|000062c0| 69 74 65 64 20 20 73 65 | 74 20 20 6f 66 20 20 7c |ited se|t of ||
|000062d0| 0d 20 20 20 20 20 6f 70 | 65 72 61 74 6f 72 73 20 |. op|erators |
|000062e0| 6d 61 79 20 62 65 20 61 | 70 70 6c 69 65 64 20 74 |may be a|pplied t|
|000062f0| 6f 20 69 74 29 2e 20 20 | 20 20 20 20 20 20 20 20 |o it). | |
|00006300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006310| 20 20 20 20 7c 0d 0d 20 | 20 20 20 20 4f 70 65 72 | |.. | Oper|
|00006320| 61 74 6f 72 73 20 6d 61 | 79 20 62 65 20 73 70 65 |ators ma|y be spe|
|00006330| 63 69 66 69 65 64 20 69 | 6e 20 61 6e 79 20 6f 66 |cified i|n any of|
|00006340| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 77 | the fol|lowing w|
|00006350| 61 79 73 3a 20 20 20 20 | 20 20 7c 0d 0d 20 20 20 |ays: | |.. |
|00006360| 20 20 5b 31 5d 20 20 20 | 20 20 20 20 20 20 20 20 | [1] | |
|00006370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006390| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063a0| 20 20 20 20 20 7c 7c 0d | 20 20 20 20 20 20 20 20 | ||.| |
|000063b0| 20 20 41 73 20 61 6e 20 | 6e 75 6d 65 72 69 63 20 | As an |numeric |
|000063c0| 76 61 6c 75 65 2c 20 65 | 69 74 68 65 72 20 69 6e |value, e|ither in|
|000063d0| 74 65 67 65 72 20 6f 72 | 20 66 6c 6f 61 74 69 6e |teger or| floatin|
|000063e0| 67 2d 70 6f 69 6e 74 2e | 20 20 20 7c 0d 0d 20 20 |g-point.| |.. |
|000063f0| 20 20 20 5b 32 5d 20 20 | 20 20 20 20 20 20 20 20 | [2] | |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.